Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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)

share|improve this answer
1  
Long-Lat should be EPSG:4326 (WGS84). EPSG:3857 and 900913 are in (not real) metres. –  AndreJ Apr 7 '13 at 5:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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