Export To Google Earth

Running programmatically

Converts a feature class to a Google Earth KML or KMZ file.

Inputs:

Outputs:

Running Programmatically

(Go to TOP)

Parameters

Expression Explanation
Function Name ExportToGoogle
<input dataset> A feature layer
<out file> A String - the full name of the output Google Earth file. The extension (KML or KMZ) is required and will define whether the result will be compressed (KMZ) or not (KML).
{KML Description} A String that will be used for a general description of the KML file.
{label field} A String representing a field name. The values in this field will be used for naming the Google Earth features.
{transparency} A Double indicating the transparency to be used. 0 = Opaque, 100 = invisible
{Z Source} A String indicating what will be the source for the elevation values. Valid strings:
  • "Z" - Z values from geometry - Only if the exported dataset to be exported has Z values (PointZ, PolylineZ, PolygonZ).
  • "Field " - Z values from a field - A numeric field is required
  • "Constant" - constant Z values for all features
{z field} A String representing a field name (numeric field). If the Z Source = "Field ", the values in this field will be used to get the Z values.
{z constant} A Double representing the Z values for all features if Z Source = "Constant"
{z units} A String indicating the units of the Z values of the input dataset. Valid strings - "Meters" and "Feet".
{z type} A String indicating how the Z values will be interpreted. Valid strings:
  • "Absolute" - Sets the altitude of the coordinate relative to sea level, regardless of the elevation of the Google Earth terrain beneath the feature.
  • "Relative" - Sets the altitude of the feature relative to the Google Earth terrain in a particular location.
  • "None" - the Z values are ignored - the feature will be displayed on the Google Earth surface.
{extrude geometries} A Boolean indicating whether to connect the geometry to the ground.
{fill color} A String indicating the fill color for the polygons and line color for polylines. Valid values: white, red, gree, blue, cyan, magenta, yellow, black, grey
{line color} A String indicating the outline color for the polygons. Valid values: white, red, gree, blue, cyan, magenta, yellow, black, grey
{line width} A Double representing the width of the Polyline features and outline width for Polygon features
{export labels} A Boolean indicating whether labels will be exported as Info-Points.
{info symbol} A String indicating which of the available Google Earth symbols will be used for displaying Info-Points. The available symbols are above.
{info size} A Double indicating the size of the Icon for the Info-Points. Actually this is a scale factor for the Google Earth markers - values of 0.5 to 1.5 will give good results.
{coordinate precision} An Integer representing the number of digits after the decimal point for exported coordinates.

Running the function

ETGWPath used in the table below is the  full path to ETGWRun.exe (E.G. "C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe")

Language Syntax
Python subprocess.call([ETGWPath, "ExportToGoogle", "input dataset", "out file", "KML Description", "label field", "transparency", "Z Source", "z field", "z constant", "z units", "z type", "extrude geometries", "fill color", "line color", "line width", "export labels", "info symbol", "info size", "coordinate precision"])
.NET using ETGWRun.exe StartInfo.FileName = ETGWPath
StartInfo.Arguments = "ExportToGoogle" "input dataset" "out file" "KML Description" "label field" "transparency" "Z Source" "z field" "z constant" "z units" "z type" "extrude geometries" "fill color" "line color" "line width" "export labels" "info symbol" "info size" "coordinate precision"
.NET using ETGWOutX.dll ExportToGoogle(input dataset, out file, KML Description, label field, transparency, Z Source, z field, z constant, z units, z type, extrude geometries, fill color, line color, line width, export labels, info symbol, info size, coordinate precision)
ArcPy arcpy.ExportToGoogle(input dataset, out file, "KML Description", "label field", "transparency", "Z Source", "z field", "z constant", "z units", "z type", "extrude geometries", "fill color", "line color", "line width", "export labels", "info symbol", "info size", "coordinate precision")

Notes:

(Go to TOP)