[postgis-users] Amatuer question - Distance between two points

Michael Signup michael.signup at hotmail.com
Fri Nov 7 15:36:37 PST 2008


That's awesome. Thanks very much Kevin.

On another note, can anyone recommend a book where I can learn the basics of the PostGIS database? 

Thanks,
Michael

> Date: Fri, 7 Nov 2008 09:03:35 -0800
> From: kneufeld at refractions.net
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] Amatuer question - Distance between two points
> 
> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

_________________________________________________________________
Your dream beach house escape for summer! Sign up for the Hotmail Road Trip today.
http://www.ninemsn.com.au/hotmailroadtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081108/35623b86/attachment.html>


More information about the postgis-users mailing list