[Mapserver-users] distance from lat-long
jerl.simpson at rkiq.com
Tue May 18 16:57:31 EDT 2004
Using PHP, this seems to work well for me. It's not completely precise,
but it's pretty close for small areas.
$C=sqrt($A*$A + $B*$B); // gives distance in meters between two points
Changqing Zhou wrote:
> Hi, I feel I am really asking a stupid question here. So please just
> discard if it makes you laugh.
> I have a pair of lat-long. My assumption is that my area is very small,
> like in a city.
> 1)Is there a simple equation I can use to calculate the distance in
> meters of those two points?
> 2)If I do d = sqrt [ sqr(p1.lat - p2.lat) + sqr(p1.long - p2.long)], does
> d mean anything at all?
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
More information about the mapserver-users