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
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users