Converts a feature class to a Google Earth KML or KMZ file.
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 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:
|
{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. |
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:
<> - required parameter
{} - optional parameter
The argument separator for StartInfo.Arguments is space. If a string might contain a space, you need to double quote it.