Note 2: The current version of the program has a bug that doesn’t let you select a file. The author has indicated on the website that a new version should be out soon, but until then, you may have to use the approach described in either this post or another post. Also available now is an online KML to shapefile converter.
In two previous posts, I covered several multi-step hacks for converting Google Earth KML files to shapefile format, since there wasn’t a single-step free approach to my knowledge. Well, there is now, and it makes the process a lot easier.
kml2shp comes in zipped format with no install – just unzip it and the associated .bpl files into the folder of your choice. If you get an error message stating that you’re missing a .bpl file, you can download them at this page. You can put the bpl files either into the same folder as the program, or you can put them into a common search path folder like Windows\system32. Run the program, and open the KML file of your choice:
The shapes will be displayed in the window; for comparison, here’s the original KML file display in Google Earth:
Click on the Export SHP button at the top, and get this screen:
For coordinate systems, you have the choice of sticking with Google Earth’s native lat/long or converting to UTM, and there’s a long list of available datums to use. You’ll have to export points, paths, and polygons separately. Click on the disk icon in the lower right to specify the file path and name; while the path and name are displayed in the text box at left, you can’t specify or modify them there. Click on Accept, and the shapefile (.shp, .shx and .dbf files) will be created. The name associated with the KML feature will be exported into the DBF file, under the field “NAME”. Here’s a plot of all three shapefiles from MapWindow, using the NAME field to label them:
The program also has the option to convert KML files to DXF and GPX format, but it doesn’t preserve the name associated with the KML shapes. For KML to DXF, the other option I’ve posted about doesn’t preserve the name either, so this is a more convenient method. But for GPX, you’re better off using some of the other programs described in earlier posts that do preserve the name.