[postgis-users] Amatuer question - Distance between two points
Kevin Neufeld
kneufeld at refractions.net
Fri Nov 7 09:03:35 PST 2008
SELECT ST_Distance_Sphere('POINT(-38.034031 145.201711)', 'POINT(-37.899854 145.087116)');
st_distance_sphere
--------------------
17670.9023488375
(1 row)
or use ST_Distance_Spheroid for a more correct answer.
http://postgis.refractions.net/documentation/manual-svn/ST_Distance_Sphere.html
Cheers,
Kevin
Michael Signup wrote:
> Hi,
>
> This is probably a very simple question but I am unable to find anything
> to point me in the right direction.
>
> I am trying to understand how I can make distance related queries with
> PostGIS. To do this, I am attempting to calculate the distance between:
>
> in Lat/Long
> Point A(-38.034031,145.201711) and Point B(-37.899854,145.087116)
>
> I have tried several methods and am still getting the distance as
> 92072.62 (I don't know what units this is in, but I am trying to get it
> in meters).
>
> Google Earth calculates the distance as 17.4 km (approximately).
>
> Regards,
> Michael
>
>
>
>
> ------------------------------------------------------------------------
> Find great deals on eBay Net yourself a bargain
> <http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Frover%2Eebay%2Ecom%2Frover%2F1%2F705%2D10129%2D5668%2D323%2F4%3Fid%3D10&_t=763807330&_r=hotmailTAGLINES&_m=EXT>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list