AW: [FWTools] PROJ.dll 4.4.6 vs. 4.5.0

Martin Fix Martin.Fix at ptv.de
Fri Sep 28 02:52:27 EDT 2007


Frank,

thanks for that info.

We're still wondering why it worked in proj-4.4.6 very well with the WKT and does not in proj-4.5.0. Was there a major change about the shift processing?

Also this problem is not related only to sphere mercator but for all coordinate systems we use (for example DHDN_GaussKruger_zone1 to zone5 etc.).

It seems that there has changed something in general which we did not notice. 

Now we're using GDAL 1.4.2 with proj-4.4.6 and it works as it should. But for the future we would like to know how to change to any newer version of proj to be on the safe side.

Thanks for all your help

	Martin

-----Ursprüngliche Nachricht-----
Von: fwarmerdam at gmail.com [mailto:fwarmerdam at gmail.com]Im Auftrag von
Frank Warmerdam
Gesendet: Donnerstag, 27. September 2007 16:58
An: Martin Fix
Cc: fwtools at lists.maptools.org
Betreff: Re: [FWTools] PROJ.dll 4.4.6 vs. 4.5.0


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