ESRI Shapefile to KML Converter

Tags: Shapefile, ESRI, KML, Converter

A basic shapefile to KML utility has been added to the files section. The utility parses a shapefile and creates the equivalent Google Maps objects. At the same time it reads the corresponding .dbf file and displays the possible columns to add to the individual shapes.

A shapefile is in fact a collection of different files. The most important files in the collection are the .shp and the .dbf files (some would say the .shx file is essential also, but it is not parsed by the Shp2Kml parser). The .shp file contains the definition of all the shapes in a special binary format, while the .dbf file is a standard dBase file, which contains one record for each shape record.

A shape record can contain several Google Maps object, eg. a polyline shape record can contain several polylines which are not connected. So when transforming the shapefile to KML you may find that several objects have the same name and description. This is intentional. The alternative was to leave sub objects without name or description.

The functionality is very straightforward. Click the 'Load Shapefile' button to load the binary definition file (the .shp file). The converter will then parse the corresponding .dbf database and will present the available columns. The column to use for the name is set using the dropdown list, while the values to add to the description are selected in the checked listbox below. Finally you need to click the 'Write Kml' button to start writing your KML file to the selected location.

Note! The code is entirely written in C# and requires .NET 2.0 installed on the computer to work. If you regularly update your computer this should have been installed close to a year ago.

1 Comment

Comments have been disabled for this content.

Latest Tweets