[postgis-users] ST_distance in meters

Oscar Zamudio cmntlk at gmail.com
Fri Jan 22 09:40:43 PST 2010


I couldn't find 900913 in the Spatial Reference List. Does anybody know
which one of the following projections uses Google Maps?

   - SR-ORG:6 <http://spatialreference.org/ref/sr-org/6/>: Google Projection
   - SR-ORG:16 <http://spatialreference.org/ref/sr-org/16/>: Mercator
   (world)
   - SR-ORG:95 <http://spatialreference.org/ref/sr-org/95/>: Google
   Maps/Microsoft Live
   - SR-ORG:98 <http://spatialreference.org/ref/sr-org/98/>: Mapy.cz
   Projection
   - SR-ORG:6627 <http://spatialreference.org/ref/sr-org/6627/>: Google
   Mercator
   - SR-ORG:6722 <http://spatialreference.org/ref/sr-org/6722/>: google map

I'm also trying to compare with Google Maps my results of measuring
distances reprojecting my original SRID-4326 data to some UTM projection but
I don't know what is the right one.
Oscar

On Fri, Jan 22, 2010 at 8:40 AM, ibrahim saricicek <
ibrahimsaricicek at gmail.com> wrote:

> 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 <lomarodpostgis at hotmail.com>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
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100122/f3866107/attachment.html>


More information about the postgis-users mailing list