Re: Maps / Distance / GeoCoding [php/mysql]
| From: | Nathan Rixham | Date: | Thu, 11 Sep 2008 22:55:34 +0000 |
| Subject: | Re: Maps / Distance / GeoCoding [php/mysql] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279926@lists.php.net to get a copy of this message | ||
Nathan Rixham wrote:
re: an earlier thread [snip]or you may just need this bit: distance = ACOS( SIN(Y(g.geopoint)*pi()/180)*SIN(Y(l.point)*pi()/180)
+COS(Y(g.geopoint)*pi()/180)*COS(Y(l.point)*pi()/180)*COS((X(l.point)-X(g.geopoint))*pi()/180))*6372.795 used to calc the distance between two points on the surface of the earth accurately