[Proj] Google Mercator Projection

Jean-Claude Repetto jrepetto at free.fr
Thu Aug 4 04:39:16 EST 2011


Le 04/08/2011 09:23, zagot a écrit :
> Hi to All,
> this is an oldie, but i cannot seem to find a solution.
> When i want to do a transform on a wgs84 to google/bing the y coordinate
> shifts.
>
> I have read this  variuos post and this official note:
> http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toGoogleEarthVirtualGlobeMercator
>
> ...so I tried adding +nadgrids=@null like i read, but with this example:
>
> from ..."+proj=latlong +datum=WGS84";
>
> to... "+proj=merc +a=6378137 +b=6378137 +lat_t1=0.0 +lon_0=0.0 +x_0=0.0
> +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"
>
> i have this result -626172.1357121646,  6887893.4928337997
>
> in the result y differ from correct value:6853955.508199729 (with Proj.NET
> the result is correct)
>
> ..seems adding +nadgrids=@null  have no effect
>
> what's I wrong?

You have forgotten to specify the datum for the projected CRS :

cs2cs +proj=latlong +datum=WGS84 +to +proj=merc +a=6378137 +b=6378137 
+lat_t1=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +datum=WGS84 +units=m 
+nadgrids=@null +no_defs
-5.625 52.4827802220782
-626172.14	6853979.30 0.00

Jean-Claude


More information about the Proj mailing list