I'm not sure if this is possible given the looseness of KML files, but I have a couple thousand KML files that I would like to convert to SHP files. They are almost exclusively line or point data. I believe it is mostly possible to convert kmls via a GUI functionality in QGIS or ArcGIS but I would hopefully be able to do them all at once via command line.

  • 2
    Help sample #2 here in the doc converts all KML files in a folder into a single GDB for ArcGIS. – KHibma Aug 2 '16 at 16:10
  • This might help: gis.stackexchange.com/questions/98/… – JCorona Aug 2 '16 at 20:10
  • These are great. But does anyone know if this works when the initial kmls are in a nested file structure. Is it possible to run this script and maintain the same file structure with the kmls? I think I could figure out how to do this with a linux/Unix system but I am forced to use a windows platform for work for the GIS software for work and don't know how to go about it. Any help would be much appreciated. – jatkins23 Aug 5 '16 at 17:36

Well there is two options to do this that I can think of. One would be to write a very simple loop within model builder or Arcpy with Arcgis and use the KML to layer tool. Without the KML files I don't know what your results would look like. The other more comand line based option would be using GDAL. Your question is almost idential to How to convert between KML and Esri's shapefile (SHP) format? I would recommend checking that out as this is probably a duplicate.

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