Layer To KML

Title  Layer To KML

Summary

Converts a feature or raster layer into a KML file containing a translation of Esri geometries and symbology. This file is compressed using ZIP compression, has a .kmz extension, and can be read by any KML client including ArcGIS Earth, ArcGlobe, and Google Earth.


Usage

Syntax

Parameter Explanation
layer

The feature or raster layer or layer file (.lyrx) to be converted to KML.

out_kmz_file

The output KML file. This file is compressed and has a .kmz extension. It can be read by any KML client including ArcGIS Earth, ArcGlobe, and Google Earth.

layer_output_scale (Optional)

For raster layers, a value of 0 can be used to create one untiled output image. If a value greater than or equal to 1 is used, it will determine the output resolution of the raster. This parameter has no effect on layers that are not raster layers.

is_composite (Optional)

Specifies whether the output will be a single composite image. If your layer is a raster, you can choose either option for this parameter without any visual difference.Checked—The output KML file will be a single composite image representing the raster or vector features in the source layer. The raster is draped over the terrain as a KML GroundOverlay. Use this option to reduce the size of the output KMZ file. When this option is used, individual features and layers in the KML will not be selectable.Unchecked—If your layer has vector features, they will be preserved as KML vectors.

boundary_box_extent (Optional)

The geographic extent of the area to be exported. Either define the extent box (in the WGS84 coordinate system) or choose a layer or dataset that defines an extent.Default—The extent will be based on the maximum extent of all participating inputs. This is the default.Current Display Extent—The extent is equal to the data frame or visible display. The option is not available when there is no active map.As Specified Below—The extent will be based on the minimum and maximum extent values specified.Browse—The extent will be based on an existing dataset.

image_size (Optional)

The size of the tiles for raster layers if the Layer Output Scale parameter value is set to a value greater than or equal to 1. This parameter has no effect on layers that are not raster layers.

dpi_of_client (Optional)

The device resolution for KML output when the Return single composite image parameter is checked. This parameter is used with the Size of returned image (pixels) parameter to control output image resolution.This parameter does not provide the ability to resample source rasters. Any input rasters will have a snapshot taken and included in the KML output as a simple .png image.

ignore_zvalue (Optional)

Specifies whether to override the z-values of the input features.Checked—The z-values of the features will be overridden and draped over the terrain. This setting is used for features that do not have z-values. This is the default.Unchecked—The z-values of the features will be respected. The features will be drawn inside KML clients relative to sea level.

Code Samples

Tags

change, convert, export, feature, format, geometry, google, google earth, import, keyhole, kml, kmz, language, make, markup, memory, symbology, turn, xml

Credits

Use limitations