[gdal-dev] ogr2ogr ignores +towgs84
Marco Lechner
marco.lechner at geographie.uni-freiburg.de
Tue Dec 4 04:30:28 EST 2007
I'm trying to translate some mapinfo-data from madagascar using a custom
proj. But ogr2ogr seems to ignore the towgs84-parameters. In fact all
these 4 commands produce the same results (which are wrong) by ignoring
"+towgs84=-189,-242,-91,0,0,0,0":
# normal
ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=omerc +lat_0=-18.9
+lonc=46.437229 +alpha=18.9 +k=0.999500 +x_0=1113136.314600
+y_0=2882900.727900 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m
+no_defs" -t_srs "epsg:32738" lim_commune_aout06_01.shp
lim_commune_aout06.tab
# without towgs84:
ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=omerc +lat_0=-18.9
+lonc=46.437229 +alpha=18.9 +k=0.999500 +x_0=1113136.314600
+y_0=2882900.727900 +ellps=intl +units=m +no_defs" -t_srs "epsg:32738"
lim_commune_aout06_02.shp lim_commune_aout06.tab
# explicit proj in t_srs:
ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=omerc +lat_0=-18.9
+lonc=46.437229 +alpha=18.9 +k=0.999500 +x_0=1113136.314600
+y_0=2882900.727900 +ellps=intl +towgs84=-189,-242,-91,0,0,0,0 +units=m
+no_defs" -t_srs "+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84
+units=m +no_defs" lim_commune_aout06_03.shp lim_commune_aout06.tab
# without no_defs:
ogr2ogr -f "ESRI Shapefile" -s_srs "+proj=omerc +lat_0=-18.9
+lonc=46.437229 +alpha=18.9 +k=0.999500 +x_0=1113136.314600
+y_0=2882900.727900 +ellps=intl +units=m" -t_srs "epsg:32738"
lim_commune_aout06_04.shp lim_commune_aout06.tab
I have to transform 160 layers therefore I want to put it into a script.
More information about the gdal-dev
mailing list