[gdal-dev] ogr2ogr natgrids option ignored?

Sven Geggus lists at fuchsschwanzdomain.de
Fri Jul 10 05:34:32 EDT 2009


Hi there,

looks like ogr2ogr just ignores my nadgrids projection parameters :(

Here is what I have:

ogr2ogr -s_srs '+proj=tmerc +lat_0=0 +lon_0=12 +x_0=4500000 +y_0=0 \
+k=1.000000 +ellps=bessel +units=m +nadgrids=./BETA2007.gsb' \
-t_srs '+proj=longlat +datum=WGS84' -f "ESRI Shapefile" out.shp in.shp

ogr2ogr -s_srs epsg:31468 -t_srs epsg:4326 -f "ESRI Shapefile" out.shp in.shp

While the latter works fine. The first version does not seem to honor the
nadgrids Option. This is at least what strace hints me to. The command does
not even try to open the BETA2007.gsb file.

Testing the same Parameters wirth cs2cs does work as expected and
BETA2007.gsb _is_ honored:

echo 4450457 5487214 | cs2cs -f "%.12f" +proj=tmerc +lat_0=0 +lon_0=12 \
+x_0=4500000 +y_0=0 +k=1.000000 +ellps=bessel +units=m \
+nadgrids=./BETA2007.gsb +to +init=epsg:4326

Regards

Sven

P.S.: I checked with ogr2ogg from gdal 1.5.2 and 1.6.1

-- 
/*
 * Wirzenius wrote this portably, Torvalds fucked it up :-)
 */                        (taken from /usr/src/linux/lib/vsprintf.c)
/me is giggls at ircnet, http://sven.gegg.us/ on the Web


More information about the gdal-dev mailing list