[Gdal-dev] Grid based transformation with ogr2ogr

uwe.schmitz at lverma.nrw.de uwe.schmitz at lverma.nrw.de
Tue May 9 08:26:28 EDT 2006


Hi folks,

as a solution for the upcoming datum shift in Germany
(from DHDN to ETRS89[=WGS84]) I'm currently experimenting 
with grid based datum shifts.

After fiddling around a little bit, I accomplished to
produce a sample grid in NTv2-Format called DHDN_ETRS89.gsb.

Cs2cs works well with it. The following command-line:

cs2cs +init=epsg:31466 +nadgrids=./DHDN_ETRS89.gsb \
   +to +proj=utm +datum=WGS84 +zone=32

gives me correct transformation results.

Now I'm trying to use ogr2ogr to transform some shape-files.
I'm currently using FWTools1.0.0b2 under WinXP (also
verified with GDAL1.3.1 under Unix) and my command-line 
looks like:

ogr2ogr -f "ESRI Shapefile" \
   -s_srs "+init=epsg:31466 +nadgrids=DHDN_ETRS89.gsb" \
   -t_srs "+proj=utm +datum=WGS84 +zone=32" \
   out\GEW01_L.shp in\GEW01_L.shp

If I set PROJ_DEBUG there are only 2 lines of
output:

pj_open_lib(proj_def.dat): call fopen(C:\PROGRA~1\FWTOOL~1.0A6\proj_lib/proj_def
.dat) - succeeded
pj_open_lib(epsg): call fopen(C:\PROGRA~1\FWTOOL~1.0A6\proj_lib/epsg) - succeede
d

Therefore I fear that the grid isn't used at all.
I've also used some other -s_srs/-t_srs combination
with no success

Also I'm wondering why the program doesn't complain, if
I specify a non existant file for +nadgrids.

Thanks for any hints.
Uwe




More information about the Gdal-dev mailing list