[gdal-dev] ogr2ogr reprojection, features are not transformed

Even Rouault even.rouault at mines-paris.org
Tue Nov 15 17:36:52 EST 2011

> I am working with data in the SAD69 Datum (EPSG:4618) from Brazil's
> IBGE and when I convert any data to/from WGS84 (EPSG:4362) it appears
> that there is absolutely no shift in the coordinates.

4326 you meant ?

> I understand that they are similar datums, but one would expect a visible
> shift. The only changes are in the files are the .prj file which contain
> the SAD69 or WGS84 GEOGCS.
> I use the following command:
> $ ogr2ogr --debug on -t_srs EPSG:4326 LC_CIDADE_wgs84.shp LC_CIDADE.shp
> OGR: OGROpen(LC_CIDADE.shp/0x1384170) succeeded as ESRI Shapefile.
> OGRCT: Source: +proj=longlat +ellps=aust_SA +no_defs
> OGRCT: Target: +proj=longlat +datum=WGS84 +no_defs
> Shape: DBF Codepage = LDID/87 for LC_CIDADE_wgs84
> Shape: Treating as encoding 'ISO-8859-1'.
> Shape: 5806 features read on layer 'LC_CIDADE'.

The issue is that the .prj format (ESRI WKT) doesn't store the TOWGS84 
parameters. So you have to manually specify the source SRS so that GDAL can 
fetch it from the EPSG database.

Try :

ogr2ogr --debug on -s_srs EPSG:4618 -t_srs EPSG:4326 LC_CIDADE_wgs84.shp 

Perhaps the shapefile driver could call AutoIdentifyEPSG() to fill the part 
losts in .prj format, but it wouldn't help for your case, because just a few 
SRS are autodetected currently.

Best regards,


More information about the gdal-dev mailing list