[gdal-dev] Source SRS not honoured if shapefile .prj file exists

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Thu Jun 6 16:42:39 PDT 2013


Hi,

I received a shapefile with a non-perfect .prj file which does not advertise
that the coordinate system is Finnish KKJ (EPSG:2393) which needs +towgs84
parameters. I knew that GDAL 1.10 finally comes with correct parameters and
thought that problem could be solved easily by adding parameter "-s_srs
epsg:2393" into ogr2ogr command. However, GDAL does not honour the parameter
if the .prj still exists in the shapefile directory. Only after deleting the
.prj file I got the correct result. I think that the correct behaviour would
be the opposite and take -s_srs instead of .prj if both are available.

Tested with GDAL 1.10.0, released 2013/04/13 and my command was
ogr2ogr -f KML -s_srs epsg:2393 -t_srs epsg:4326 test4.kml test_region.shp

-Jukka Rahkonen-



More information about the gdal-dev mailing list