Try reversing your coordinate pairs. It should be X Y, not Y X.<br><br><div><span class="gmail_quote">On 4/30/07, <b class="gmail_sendername">Dmitri Maximovich</b> <<a href="mailto:maxim@md.pp.ru">maxim@md.pp.ru</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>Just started with PostGIS and have a (possibly naive) question about<br>calculating distance between two locations on the Earth surface.
<br><br>Say I have two points with GPS coordinates: (44.397854 -79.5505) and<br>(44.37887 -79.688644). When I calculate distance between them in Google<br>map or Mappoint or any other tool I'm getting around 11.2 km,
e.g.:<br><br><a href="http://boulter.com/gps/distance/?from=44.397854+-79.5505&to=44.37887+-79.688644&units=k">http://boulter.com/gps/distance/?from=44.397854+-79.5505&to=44.37887+-79.688644&units=k</a><br>
<br>When I'm trying to do the same in PostgreSql (8.0.12):<br><br>select distance_spheroid(<br> GeomFromText('POINT(44.397854 -79.5505)', 4326),<br> GeomFromText('POINT(44.37887 -79.688644)', 4326),
<br> 'SPHEROID["WGS_1984",6378137,298.257223563]');<br><br>15429.5199451789<br><br>Should I interpret the result as 15.4 km? Obviously I'm doing something<br>wrong here. Any hint would be greatly appreciated. Thanks.
<br><br>--<br>Sincerely,<br>Dmitri Maximovich<br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>************************************
<br>David William Bitner