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:
PROJCS["UTM_Zone_35_Northern_Hemisphere",
    GEOGCS["GCS_Geographic Coordinate System",
        DATUM["EUROPEAN_DATUM_1950",
SPHEROID["International_1909_Hayford_Intl_1924",6378388,297.0000000284015]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",27],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]

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 http://trac.osgeo.org/gdal/ticket/2271)?

--
Best Regards,
Brent Fraser


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to