[MapProxy] Distortions in EPSG 4236 -> 900913 reprojection
Andreas Trawoeger
atrawog at datenscheibe.org
Wed Dec 1 14:09:14 EST 2010
Hi Oliver!
2010/11/29 Oliver Tonnhofer <olt at omniscale.de>:
>
> I can reproduce the error. libproj wraps around at the date line and transforms a point at 180.001 to -179.999 (in 900913). That messes up the pixel coordinates for the image transformation. Unfortunately, I can't just hack in a quick fix, because it can affect other transformations as well. I'll look into that the next time I touch the transformation code.
I don't want to count how much time I spend trying to fix or mitigate
this problem. The bad news is that at first I ended up having exactly
the same problem while trying to transform from EPSG 900913 -> 4326
which was one the first thing I tried :-((
The good news is that their is an astonishingly simple fix: Simply add
'+over' to your PROJ.4 EPSG:900913 definition [0].
My new 900913 definition in /usr/share/proj/epsg is:
# Google Maps Global Mercator
<900913> +proj=merc +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 +over
After I made that change all of my EPSG 900913 transformation problems
where fixed instantly :-((
cu andreas
[0] http://trac.osgeo.org/proj/wiki/GenParms#Parameterlist
More information about the MapProxy
mailing list