[FWTools] PROJ.dll 4.4.6 vs. 4.5.0

Frank Warmerdam warmerdam at pobox.com
Thu Sep 27 10:58:17 EDT 2007


On 9/27/07, Martin Fix <Martin.Fix at ptv.de> wrote:
> We start with
>
> wgs84 / latlong
>
> GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]]
>
> and go to sphere mercator
>
> PROJCS["Sphere_Mercator",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",0],UNIT["Meter",1]]
>
> using a point with 8.403300/48.999240 the result should be
> 934404.3271/6267711.1464 but it isn't. The x-coordinate is correct but y is
> different.

Martin,

I haven't had a chance to confirm that you are running into the
"normal" problem but i think this relates to FAQ:

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

That topic should cover what you need to do directly in PROJ.4,
but it gets a bit more tricky through GDAL.  You can specify
input coordinate systems for GDAL in PROJ.4 format, but
internally it converts this to WKT and looses things like nadgrids
directives.

So, my suggestion is that you use a WKT like the following with
GDAL tools:

PROJCS["unnamed",GEOGCS["Normal Sphere
(r=6370997)",DATUM["unknown",SPHEROID["sphere",6370997,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],EXTENSION["PROJ4","+proj=merc
+ellps=sphere +wktext"]]

The "trick" here is this use of EXTENSION[] to preserve
the PROj.4 equivelent.

Somehow this needs to make it into a GDAL FAQ as well
since it is quite a common issue.  I'm guessing the great
resurgance in use of Mercator has something to do with
Google Maps and/or the MS equivelents which I think
do stuff in Mercator.

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    | Geospatial Programmer for Rent


More information about the FWTools mailing list