2

I have a lot of KML files set as lon-lat (geographic coordinates) and want to set them as UTM (E-N) and WGS84 with Python (using arcpy, ogr, or gdal)

Does anyone knows how to do this?

1 Answer 1

1

I think KML only uses Long-Lat coordinates (EPSG codes 3857 or 900913). You can try reprojecting to your local UTM projection and save them as another format (e.g. Shapefile, or GeoJSON or whatever). ogr2ogr should work for you:

ogr2ogr -f "ESRI Shapefile " -s_srs "EPSG:3857" -t_srs "EPSG:XXXXX" \
       output_file.shp my_kml_file.kml

where XXXXX is the EPSG code from your target projection (go here for clues as to what code to use)

1
  • 1
    Long-Lat should be EPSG:4326 (WGS84). EPSG:3857 and 900913 are in (not real) metres.
    – AndreJ
    Commented Apr 7, 2013 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.