Note 1: See this series of posts for info on converting shapefiles to KML format.
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.
what about other properities of my kml file? i mean html from markers infowindow that could be a set of values. is it possible to transfrom shp with many columns to kml with markups including values from my table?
As of right now, kml2shp doesn’t import any other data from the kml file to the shapefile attribute data table except for the name. I suspect there’s too many ways to enter data in a KML file to make such a converter practical.
Several of the shapefile to KML converters I’ve blogged about have the ability to export attribute data along with the coordinates to the final KML file.
Hi Leszek
Thanks again for a wonderful tip. I used the tool and it worked quite fine for me.
Cheers
Askan.
THANK YOU, GREAT ADVISE, GREAT TOOL, SLIM, SIMPLE, AND TO THE POINT!!!!!!!
EXACTLY WHAT I WAS LOOKING FOR.
Cool tool if all you need are point locations, but not very useful otherwise if you need any kind of attributes. If google can read the attributes correctly, why can’t a conversion do this?
Lovely, only tested it and it seems to work quite well and very user friendly.
Hello, I’m hving a bit of trouble using this application.
Whenever I open the kml file in the klm2shp main window it shows a view of the extent that’s zoomed way in only one feature (I can only see a small section of a boundary line from a file containing polygons for 89 parks).
I see no way to zoom out to the full extent that would show all the features, so when I convert to shp. it only converts the one line I was viewing before (althugh it keeps atribute data for al 89 features).
Help anyone?
Thanks.
Hello,
This application is awesome! It just runs perfectly!
But I have a problem, I’ve used it to a school work and now I have to write about all softwares and tools I’ve used, but I have no info about kml2shp.
I’d like informations about who has made the software and its properties.
Thank u.
There’s a contact form at the Zonums website where you downloaded the software.
A really big problem: I click on the Export SHP button at the top, but I DON’T get the screen to export the file. there is siply nothing going on. so what’s wrong?
Thanks for help!
Yes, I am having the same problem as Petra, it seems that nothing happens when I try and process data. I could open a kml file and it showed the points in it, but nothing happens when I click on export. Also the Batch Processing button brings up a similar window to the conversion dialog above, but again I can’t get any results.
Hello,
I was also having problems with the free Zonums “kml2shp” software. Fortunately, I just discovered from a colleague that there is a free ESRI kml to shp converter to be used in ArcMap Toolbox. Visit this site to download it: http://arcscripts.esri.com/details.asp?dbid=15603
Be sure to get the version created by Jason Parent (because there is another one created by Srinivasa Rao that does not have a tbx file). Follow the pdf Installation Guide that comes with the download. The converter script assumes that ArcGIS is installed on the C drive, so if yours is not on the C drive, you will have to edit the path in the script.
Good luck.
When I try to open any kml file I get the message: “Invalid filename” and the program stops. Is there anyone can help me?
me too.
have anyone help us?
Same problem with “invalid filename”. Any ideas?
I’ll fourth that. Same problem with filename issue. Tried three different kml/kmz files to no avail. Tried renaming the file to various different names, still no luck. This just seems to be broken.
I’ll fifth that. Telling me there is an invalid filename.
i want to convert klm files to shapes files, for this reason I want to need the program
Thanks
Met too. kml2shp just says “invalid filename”
Anyone find a solution
Invalid filename, too. Borland libraries, filename itself and GE version are not an issue, but the program returns the same error. Can you please help?
Hi,
In fact, there is a problem with the version created by Jason Parent.
However, there is another kml2shp extension on ESRI ArcScripts site that really works very fine!
Here is the link: http://arcscripts.esri.com/details.asp?dbid=14988
Good luck.
Maria
In case kml2shp doesn’t work, there is another tool – DNR GARMIN. Its free and converts between GPX, KML and SHP.
http://www.dnr.state.mn.us/mis/gis/tools/arcview/extensions/DNRGarmin/DNRGarmin.html
Regards,
Lothar
Hi ,
We have a converter to convert Google Earth’s KML file to Shape file(kml2shp). This converter can convert any type of KML to the Shape file format as per the standards. With this converter, you get the advantage of having your own shape file for any area of the world thus relieving your need to search or purchase the Shape file . This converter proves to be a User Friendly one as its GUI is so simple that you don’t need to specify anything for conversion.
You all get this for a very minimal one time cost. If you like to have your own converter for generating shape file, reach us at dev.fevisis@gmail.com
ref blog website : http://fevisis.wordpress.com/kml2shp/
Regards
fevisis dev team
website : http://www.fevisis.com – Coming Soon….
Blog : http://fevisis.wordpress.com
http://fevisis.blogspot.com
mail : dev.fevisis@gmail.com
Same Error.I downloaded & extract all .pbl file. It dosn’t work. But I am sure I had this software 2 years ago and it worked good. but i lost it. the problem in last version was that the kml file should just have one type.poitnt or ploygon or … .and also an empty object (point or polygon) shouldn’t include in kml file.an empty object hase created when you push for example point button in GoogleEarth and do not click on the map and then press OK.
these were two bugs of my last version.what a pity that I lost it.
The author of the program is aware of these issues, but still hasn’t put out an updated version. But he does have an online KML to shapefile converter available:
https://freegeographytools.com/2009/online-kml-to-shapefile-converter
And, as mentioned in an earlier comment, DNRGarmin can load KML files and save the data as shapefiles. Not as good as the stand-alone when it’s working, and not as good as the online converter, but it’s there. And if you have a Garmin GPS and do GIS work, DNRGarmin is a must-have program.