KML To Layer (Conversion)

Summary

Converts a KML or KMZ file into a feature class along with a layer file derived from the source renderer information inside the KML/KMZ.

Learn more about KML support in ArcGIS

Usage

Syntax

KMLToLayer_conversion (in_kml_file, output_folder, {output_data})
ParameterExplanationData Type
in_kml_file

The KML or KMZ file to translate.

File
output_folder

The destination folder for the File Geodatabase and layer (.lyr) file.

Folder
output_data
(Optional)

The name of the output File Geodatabase and layer file (.lyr). Defaults to the name of the input KML file.

String

Code Sample

KMLToLayer Example 1 (Python window)

Converts a KMZ file into an FGDB from the Python window.

import arcpy

arcpy.KMLToLayer_conversion(r'C:\kmls\earthquakes.kml',r'C:\gisdata\fromkmls','earthquake_09')

Environments

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

11/14/2011