How to Convert a KML File into an ArcGIS Compatible Format

Ad:


Share:

With the proliferation of KML files created for use in Google Maps, Google Earth, or Google Fusion Table, you may find yourself needing to bring the data from a KML file into ArcGIS.  KML files are an XML-based geographic dataset and have an extension of .kml (.kmz are compressed KML files).

ArcGIS can’t natively read KML files, so in order to access the geographic data, you will first need to first convert the KML file into a personal geodatabase (.gdb) using a tool provided within ArcGIS called KML2Layer.  The only way to actually view a KML file natively in ArcGIS without having to convert it is to purchase the ArcGIS Data Interoperability extension, which enables ArcGIS the ability to directly view more than 100 different GIS file formats.

Some notes to consider before starting this GIS tutorial:

KMLs and KMZs (up to version 2.2) can be converted using the KML2Layer tool.

Before you start the conversion process, make sure that the KML file has valid geographic data or you will be frustrated by the failure of your KML to convert to a geodatabase.  If your conversion process fails after following the steps in this GIS tutorial, check to make sure that the KML file contains valid geographic data.  The Official Google Maps blog has information about KML validators.

The steps and screenshots in this tutorial were done using ArcGIS 10.0.

Converted KML file in ArcGIS

Converted KML file in ArcGIS

Open up ArcCatalog.  Click on the ArcToolBox icon (1) to open up the tools section.  Then click on the Conversion toolbox (2) to open up the data conversion options.  Select the “From KML” toolkit to access the ‘KML to Layer’ tool.

ArcGIS has a KML to layer conversion tool.

ArcGIS has a KML to layer conversion tool.

In the “KML to Layer” dialogue box, select the folder icon next to the Input KML File box.  Navigate to the location on your hard drive where the KML is stored.  In the Output Location select the folder where you want the personal geodatabase (.gdb) to be stored.  In the Output Data Name either type in the name that you want the geodatabase to have or accept the default (which retains the name of the KML file.

KML to Layer Conversion Settings

KML to Layer Conversion Settings

A scrolling text indicated located in the lower right hand corner of ArcCatalog (1) will indicate the conversion is in process.  Depending on the size of the KML file, this conversion process can take seconds or several minutes.  Once the KML to ArcGIS layer has completed, a small window (2) in the lower right hand corner of your desktop will pop up with a green check mark announcing the completion of the conversion.  If the conversion fails, the window will have a red check mark.

A successful KML to layer conversion is indicated by a green check mark.

A successful KML to layer conversion is indicated by a green check mark.

Now you’re ready to view the converted file.  In the catalog tree section (1) of ArcCatalog, navigate to the folder you designated in the KML to Layer dialogue window as the output location.  Find the .gdb file containing the same name you selected as the Output Data Name.  Click on the geodatabase to open it and drill down to the file you converted.  The geographic dataset will be housed within “Placemarks” and will have an appendage of _point, _line or_polygon depending on the type of vector data converted.    A preview of the file can be viewed in the preview section (2).  You can toggle back and forth between the geographic data and the attribute table (3).  The converted file can now be loaded into an ArcMap session.

Converted KML file as a geodatabase.

Converted KML file as a geodatabase.

The output geodatabase file will be in the WGS84 coordinate system.  If needed, the resulting geodatabase can be be reprojected after the conversion process.  As noted in the beginning of this tutorial, if the KML file doesn’t contain valid geographic features, the conversion will fail.

Related GIS Data and Mapping Articles


Ad:




Advertising


Like this article and want more?

Enter your email to receive the weekly GIS Lounge newsletter:

Advertising