[Proj] mercator projection to spherical ellipsoid from WGS84

Frank Warmerdam warmerdam at pobox.com
Fri Mar 30 16:18:31 PDT 2007


Folks,

To follow up on this, I have discovered a solution!    The solution
is to add +nadgrids=@null to the mercator translation.

eg.
warmerda at amd64[122]% cs2cs +proj=latlong +datum=WGS84 +to +proj=merc
+ellps=sphere +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
+k=1.0 +units=m +nadgrids=@null +no_defs
-84 30
-9350837.23     3503549.84 -0.00

What this does is tell PROJ.4 to use the grid shift fill "null" to
convert lat/long coordinates on this datum/ellipse to WGS84.  The null file
applies no shift, and prefixing it with "@" tells PROJ.4 to proceed without
error after applying no change if the grid shift file can't be found.

I have added an entry in the FAQ on this (it may not be on the web site yet):

  http://proj.maptools.org/faq.html#sphere_as_wgs84

Let me know if people have suggested rewording.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Proj mailing list