blankblank blank

Export Shapefiles To Google Earth II – Shp2KML Converter

In the first post of this series, GPS TrackMaker was used as a simple way to export point and line shapefile data to Google Earth’s KML format. But GPS TrackMaker is limited in its ability to export shapefile attribute data; it can only export one attribute to label each shape plotted. And it has difficulty dealing with shapefiles that have large numbers of vertices. Today’s post will deal with a simple free program that allows you to export data from multiple attributes to the KML file, and which also seems to have fewer problems with large shapefiles.

Shp2KML Converter (freeware; registration required) has a very straightforward interface:

shapefile to KML converter

Click on the “Load Shapefile” button to open the shapefile you want to convert, which must be in WG84 latitude/longitude coordinates, or use the File => Load menu option. Next, from the top drop-down menu, select the shapefile attribute you want to use to label individual shapes in the Google Earth “Places” pane. In the window below the Name box is a list of all the shapefile attributes; you can select which ones you want to include in the KML file by checking the appropriate box. You have highlight an attribute name first by clicking on it before you can check the box.

Finally, click on “Write KML” (or select File => Save As KML from the menu), and the KML file will be created. Here’s a screenshot from Google Earth showing the results from a large point shapefile that plots Arizona mines:

results from shapefile to KML converter

There are over 10,000 mines in this shapefile; GPS TrackMaker was unable to convert it successfully to KML format, but Shp2KML Converter didn’t have a problem with it. Click on any of the markers above, and a pop-up balloon will appear that has the attribute data you specified above in a single line, each attribute separated from each other by a vertical line “|”. For example, the marker for the “RAY KELVIN” mine is labeled with that name in Google Earth, and clicking on the marker brings up a pop-up with “RAY KELVIN | LEAD, SILVER, COPPER, GOLD, ASBESTOS | UNDERGROUND” as the exported attributes NAME, COMMODITY, and TYPE.

Unlike GPS TrackMaker, you have no control over marker or line color from the Shp2KML Converter program itself, although you can always modify it in Google Earth. And since you can’t modify color based on attribute, a polygon/area shapefile will plot with all areas having the same color. So if you have a shapefile where you want to distinguish between different markers, lines or areas based on an attribute, or you need to re-color shapes outside of Google Earth, Shp2KML Converter won’t do the job for you. But for simple shapefiles with minimal sets of attributes, and for shapefiles with lots of vertices, Shp2KML Converter is fast, easy to use, and produces good results.

Looking for something else? Enter some keywords below, then click "Search".    

7 Responses to “Export Shapefiles To Google Earth II – Shp2KML Converter”

  1. 1 Jacob Reimers

    I wrote the Shp2KML converter and I just wanted to write a short comment about what you say about the lack of customization of the KML files. On the same site you will also find a Shp2KML assembly for .NET that allows you to handle shapefiles programatically, i.e. as individual objects. It does require that you have a licensed version of my Google Maps Control, but it has a great deal more features for customization (fx. reading custom coordinate formats) and the write routines are much faster and more memory efficient. But thanks for the review.

  2. 2 Mario Cusiquispe Q.

    Hola deseo sucribirme para el conversor de shp a klm

  3. 3 Lope

    thanks in advance

  4. 4 Lope

    thanks in advanced

  5. 5 Bat dong san

    Is there any tool to convert SQL server 2008 spatial database to ShapeFile?

    Ho Nguyen

  6. 6 rizah

    I need this to try how it works then i will by one copy if it is needed!

  7. 7 miguel ulloa

    thanks in advance

Comments are currently closed; feel free to contact me with questions/issues.