[gdal-dev] myshape.prj versus -s_srs

Stefan Keller sfkeller at gmail.com
Wed Jan 16 19:52:41 EST 2008


I'm trying to a shapefile to KML. The Shapefile driver indicates that "If a
.prj files (...) is present, it will be read and used to associate a
projection with features.". In addition, the OGR KML driver documentation
says "All OGR KML output will be presented in EPSG:4326.".

Let's say the input files are myshape.shp, myshape.shx, myshape.dbf and
myshape.prj and I try "ogr2ogr -f kml out.kml myshape.shp".
then the resulting coordinates are still in the source coordinate system:
Why? I espected that theya re transformed to WGS84 according to the
documentation mentioned.

This is what finally worked: "ogr2ogr -f kml del_prairie.kml del_prairie.shp
-s_srs EPSG:21781 -t_srs EPSG:4326". But indicating "-s_srs EPSG:21781"
seems to me redundant to the existing file myshape.prj. Any explanations?

-- Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080117/d2c671de/attachment.html


More information about the gdal-dev mailing list