Hi; For 4326 projection distance unit is in degrees. Google maps use 900913 projection code, and units for this projection. To get the same distance calculation; firstly add 900913 projection to spatial_ref_sys table.
Then use this query select st_distance(st_transform(tableA.colB,900913),st_transform(tableA.colC,900913)) Regards.. IBO.. On Fri, Jan 22, 2010 at 1:17 PM, lomarod <[email protected]> wrote: > > Hi, > > I have a table "tableA" with the column "colB" and "colC" type geometry. > > tableA.colB = geometryfromtext('POINT('-19.922488 -43.9367')',4326) > tableA.colC = geometryfromtext('POINT('-19.926357 -43.934223')',4326) > > Using google earth or google maps, a have the distance between this two > points in 500 meters. > > When I execute the query > select st_distance(tableA.colB, tableA.colC) from tableA my result is > 0,004593984... > > How can I have the same result as google maps ? > What am I doing wrong ? > > > -- > View this message in context: > http://old.nabble.com/ST_distance-in-meters-tp27271750p27271750.html > Sent from the PostGIS - User mailing list archive at Nabble.com. > > _______________________________________________ > 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
