[gdal-dev] coordinate transformation problem in python
Frank Warmerdam
warmerdam at pobox.com
Tue Jul 8 12:29:53 EDT 2008
WolfgangZ wrote:
> #target SRS
> tSRS=ogr.osr.SpatialReference()
> tSRS.ImportFromEPSG(31468)
Wolfgang,
When I check what OGR uses for EPSG:31468 I see:
+proj=tmerc +lat_0=0 +lon_0=12 +k=1 +x_0=4500000 +y_0=0 +ellps=bessel
+datum=potsdam +units=m +no_defs
I see that PROJ defines datum=potsdam as:
potsdam bessel towgs84=606.0,23.0,413.0
Potsdam Rauenberg 1950 DHDN
> Then I tried it with cs2cs.exe ad the result from there is:
> cs2cs.exe +proj=latlong +datum=WGS84 +to +proj=tmerc +lat_0=0 +lon_0=12
> k=1.000000 +x_0=4500000 +y_0=0 +ellps=bessel
> +towgs84=591.28,81.35,396.39,1.477,-0.0736,-1.458,9.82 +units=m +no_defs
> 12.074760 47.893320
> 4505696.75 5306125.78 -52.43
>
> I suppose the my python code is ignoring the different ellipsoid. Is
> that behaviour desired? What about other gdal software like gdalwarp?
So in my opinion you are getting different results between cs2cs and
OGR because OGR uses different datum definitions than you are using.
You might be better off uses importFromProj4() instead of ImportFromEPSG()
if you have particular ideas on the datum shift you want to use.
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 gdal-dev
mailing list