KML to Shapefile – Converting Between KML and Shapefile (SHP) Format

convertfile formatsinteroperabilitykmlshapefile

My users are sending me point data that were digitized using Google Earth.

How can I convert their KML to a shapefile and vice versa?

Best Answer

Using the open source ogr2ogr from GDAL/OGR:

ogr2ogr -f 'ESRI Shapefile' output.shp input.kml

or for the reverse:

ogr2ogr -f KML output.kml input.shp 

As noted in grego's comment below, you may need to use double quotes instead of single quotes for the output format option (e.g. "ESRI Shapefile" for the Windows command line). See also the gdal wiki.

Related Question