Hi;<br><br>For 4326 projection distance unit is in degrees. <br>Google maps use 900913 projection code, and units for this projection.<br>To get the same distance calculation; firstly add 900913 projection to spatial_ref_sys table.<br>
<br>Then use this query<br><br>select st_distance(st_transform(tableA.colB,900913),st_transform(tableA.colC,900913))<br><br>Regards..<br>IBO..<br><br><div class="gmail_quote">On Fri, Jan 22, 2010 at 1:17 PM, lomarod <span dir="ltr"><<a href="mailto:lomarodpostgis@hotmail.com">lomarodpostgis@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi,<br>
<br>
I have a table "tableA" with the column "colB" and "colC" type geometry.<br>
<br>
tableA.colB = geometryfromtext('POINT('-19.922488 -43.9367')',4326)<br>
tableA.colC = geometryfromtext('POINT('-19.926357 -43.934223')',4326)<br>
<br>
Using google earth or google maps, a have the distance between this two<br>
points in 500 meters.<br>
<br>
When I execute the query<br>
select st_distance(tableA.colB, tableA.colC) from tableA my result is<br>
0,004593984...<br>
<br>
How can I have the same result as google maps ?<br>
What am I doing wrong ?<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://old.nabble.com/ST_distance-in-meters-tp27271750p27271750.html" target="_blank">http://old.nabble.com/ST_distance-in-meters-tp27271750p27271750.html</a><br>
Sent from the PostGIS - User mailing list archive at Nabble.com.<br>
<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" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</font></blockquote></div><br>