[gdal-dev] org2ogr, KML, and srs definition
bfraser at geoanalytic.com
Sat Feb 18 14:11:35 EST 2012
I have some shapefiles I thought I would look at in Google Earth, so I
used ogr2ogr (v1.8.1) to convert them to KML:
ogr2ogr -f "KML" Lines_OGR.kml Lines.shp
but they appeared about 100 meters Northeast of my expectation, leading
me to believe there was a Datum problem.
ogrinfo reported (since there is a .prj file created by ArcMap):
Layer SRS WKT:
GEOGCS["GCS_Geographic Coordinate System",
note the ED50, which is correct for my shapefiles. After a few attempts
experimenting, it was only when I used -s_srs AND -t_srs on the command
line the features were shown where I expected them:
ogr2ogr -s_srs "EPSG:23035" -t_srs "EPSG:4326"...
The part that bothered me was there was no message from ogr2ogr warning
me about source/target SRS issues. It seems counter-intuitive since
ogrinfo was able to intreprete the .prj file of the source data, and the
only (?) allowable SRS of KML is EPSG:4326.
It this a known issue (other than a related
More information about the gdal-dev