Writer Directives and Workbench Parameters

The KML Writer processes several keywords in the mapping file. These are all prefixed by the current <WriterKeyword>_. By default, the Writer keyword is KML21.

DATASET

Required/Optional: Required

This keyword specifies the location for the output KML dataset. If the dataset name contains the extension “.kml”, a single KML document will be created, if the dataset name contains ".kmz" a KMZ file will be created. Otherwise, it is assumed that the dataset is a folder. In the case of either a KMZ, or a folder dataset, the filename of the "root" document will be doc.kml unless otherwise specified using the DOCUMENT_FILENAME keyword.

Workbench Parameter: Destination OpenGIS KML Encoding Standard File

DOCUMENT_FILENAME

Required/Optional: Optional

This keyword specifies an alternative filename for the root document if the dataset is either a KMZ file or a folder. Use of this keyword may result in a dataset that is unreadable by Google Earth.

Workbench Parameter: Root Document Name

This parameter is specified at the feature-type level. Specifying a file name forces a certain set of features to be segregated in a separate file.

Open the Writer Feature Type Properties dialog and click the Format Parameters tab.

OUTPUT_SCHEMA

Required/Optional: Optional

Specifies whether or not schema elements should be output. Possible values are Yes, or No. The default is Yes.

Workbench Parameter: Create KML Schema Elements

UPPERCASE_SCHEMA

Note: This directive is deprecated as of FME 2008.

Required/Optional: Optional

Specifies whether or not the metadata names should be converted to uppercase to avoid namespace clashes.

AUTO_CREATE_NETWORK_LINKS

Required/Optional: Optional

Specifies whether or not NetworkLink elements should be automatically generated when documents are referenced. Possible values are Yes, or No. The default is Yes.

Workbench Parameter: Automatically Create Network Links

ATTR_IN_DESCRIPTION

Required/Optional: Optional

Determines whether or not user-defined attributes will be included in the feature’s description field. The value of the HTML_DESCRIPTIONS preference will determine if the attributes, and their corresponding values will be displayed using a HTML table, or a series of colon-separated key-value pairs. Values can be Yes or No. The default is Yes.

Workbench Parameter: Attribute tables in description field

HTML_DESCRIPTIONS

Required/Optional: Optional

Specifies whether or not the description, snippet, and balloon text elements should be wrapped in a CDATA block. Possible values are Yes, or No. The default is Yes.

Workbench Parameter: Use HTML description fields

DETECT_RASTERS

Required/Optional: Optional

Controls whether or not the writer will examine incoming features to determine if they have raster geometry. If a raster geometry is detected, the feature will be forced to be a GroundOverlay feature. The value can be Yes or No. The default is Yes.

Workbench Parameter: Automatically detect raster features

RASTER_MODE

Required/Optional: Optional

Specifies how the writer will handle raster features. This preference only applies if the DETECT_RASTERS preference is enabled. The possible values, and their corresponding behaviours are detailed below

  • write - (Default behavior) Write the raster feature using the FME writer that corresponds to the RASTER_FORMAT option. This option allows the KML writer to handle raster features irregardless of their origin, as well as to take advantage of any resampling performed during the transformation process.
  • copy - Copy the image file that the raster feature originated in to the folder of the KML dataset. The resulting <GroundOverlay> element will reference the copy of the image file. Note: This will only work for PNG, JPEG, or TIFF images.
  • relative - Similar to the "copy" option, but leaves the image file in its original location. This option avoids gratuitous file copying.

Workbench Parameter: Raster Handling Mode

RASTER_FORMAT

Required/Optional: Optional

Specifies what file format should be used if the RASTER_MODE preference is "write". The possible values are "tiff" and "jpeg". The default is "jpeg".

Workbench Parameter: Raster Output Format

RASTER_COMPRESSION_LEVEL

Required/Optional: Optional

Specifies the raster compression level that should be used if the RASTER_MODE preference is "write". See the GEOTIFF and JPEG writers for appropriate values.

Workbench Parameter: Not applicable

INFORMATION_POINT_ICON

Required/Optional: Optional

Specifies the icon that should be used for information point icons. The value should be either the full path to the icon, or the name of an icon in $(FME_HOME)/icons. If no value is specified, the information point icon will not be created.

Workbench Parameter: Information Point Icon

This parameter is specified at the feature-type level, and specifies the information point icons that will be used for certain features.

Open the Writer Feature Type Properties dialog and click the Format Parameters tab. Click the Browse button to the right of the Information Point Icon field.

COPY_ICON

Required/Optional: Optional

Specifies whether icons should be copied from their location to the dataset’s images folder. The possible values are Yes and No. The default is Yes.

Note: This only applies to icons referenced by the kml_icon attribute, icons referenced by the kml_icon_href will not be copied. If the kml_icon_href is present, the value of kml_icon will be ignored.

Workbench Parameter: Copy icons to destination dataset

LOG_VERBOSE

Required/Optional: Optional

Specifies whether or not the writer should increase the logging verbosity. Possible values are Yes and No. The default is No.

Workbench Parameter: Verbose Logging

ORIENTATION

Required/Optional: Optional

Specifies whether @Orient should be used to orient features prior to writing. The possible values are None, Right and Left. The default is None.

Workbench Parameter: Force Geometry Orientation

REGIONATE_DATA

Required/Optional: Optional

Specifies whether or not features with vector geometry (Placemarks) should be passed through the regionator pipeline prior to writing. Possible values are Yes and No. The default is No.

Workbench Parameter: Regionate Vectors (beta)

REGIONATOR_PIPELINE

Required/Optional: Optional

Specifies a specific FME factory pipeline that will be used to pre-process (regionate) vector features prior to being written by the writer.

The value is either the path to the pipeline file, or the name of a file located in $(FME_HOME)/plugins/kml21.

The default value is fmeregionator.fmi.

Workbench Parameter: Vector Regionation Pipeline

EXEC_GO_PIPELINE

Required/Optional: Optional

Specifies whether or not features with raster geometry (GroundOverlays) should be passed through the GO pyramider pipeline prior to writing. Possible values are yes' or no'. The default is no'.

Workbench Parameter: Pyramid GroundOverlays (beta)

GO_PYRAMIDER_PIPELINE

Required/Optional: Optional

Specifies a specific FME factory pipeline that will be used to pre-process (pyramid) raster features prior to being written by the writer.

The value is either the path to the pipeline file, or the name of a file located in $(FME_HOME)/plugins/kml21.

The default value is fmegroundoverlaypyramider.fmi.

Workbench Parameter: GroundOverlay Pipeline

EXEC_PO_PIPELINE

Required/Optional: Optional

Specifies whether or not PhotoOverlay features should be passed through the PO pyramider pipeline prior to writing. Possible values are 'yes' or 'no'. The default is 'no'.

Workbench Parameter: Pyramid PhotoOverlays (beta)

PO_PYRAMIDER_PIPELINE

Required/Optional: Optional

Specifies a specific FME factory pipeline that will be used to pre-process (pyramid) raster features prior to being written by the writer.

The value is either the path to the pipeline file, or the name of a file located in $(FME_HOME)/plugins/kml21.

No default pipeline is provided.

Workbench Parameter: PhotoOverlay Pipeline

WATERMARK_NAME

Required/Optional: Optional

The name element value of the ScreenOverlay element used to provide the watermark.

Workbench Parameter: Watermark Name

WATERMARK_SNIPPET

Required/Optional: Optional

The snippet element value of the ScreenOverlay element used to provide the watermark.

Workbench Parameter: Watermark Snippet Text

WATERMARK_ICON

Required/Optional: Optional

The icon to use for the ScreenOverlay element used to provide the watermark. The value can be any value allowable for the kml_icon format attribute.

Workbench Parameter: Watermark Overlay Icon

DATASET_HINT

Required/Optional: Optional

The value of the hint' attribute of the kml element for the dataset.

The default is none. Users wishing to write datasets for Google Sky should use the value "target=sky". See the Google KML documentation for further information.

Workbench Parameter: KML hint attribute

STYLE_DOC

Required/Optional: Optional

Specifies the filename of an external kml file that will be used to store Style or StyleMap elements. If specifed all Style and Stylemap elements will be routed to this document.

The value cannot be a path, and must include the ".kml" extension.

Workbench Parameter: External Style Document

SCHEMA_DOC

Required/Optional: Optional

Specifies the filename of an external kml file that will be used to store Schema information for the dataset. If specified, Schema elements will be written to this file, and the schemaUrl value of each placemark will be updated accordingly.

The value cannot be a path, and must include the ".kml" extension.

Workbench Parameter: External Schema Document

ATOM_AUTHOR_NAME

Required/Optional: Optional

Specifies the value of the <atom:name> element for the dataset.

Workbench Parameter: Author Name

ATOM_AUTHOR_EMAIL

Required/Optional: Optional

Specifies the value of the <atom:email> element for the dataset.

Workbench Parameter: Author Email

ATOM_LINK_HREF

Required/Optional: Optional

Specifies the value of the <atom:link> element for the dataset.

Workbench Parameter: Author URL

OMIT_DOCUMENT_ELEMENT

Required/Optional: Optional

Controls whether a root-level <Document> element is created.

Possible values are Yes and No. The default is No.

Workbench Parameter: Omit Document Element

TARGET_HREF

Required/Optional: Optional

Specifies the URL value of the targetHref for the NetworkLinkControl Updates

Workbench Parameter: Target Href

CREATE_EMPTY_FOLDERS

Required/Optional: Optional

If the value is “no” (default), then the folders for user-defined feature types will only be created if at least one feature is written with a feature type corresponding to the folder name. If the value is “yes”, then a <Folder> will be created for each user-defined feature type, regardless of whether or not any features are written with that feature type. Note: This option does not apply to feature type fanout.

Workbench Parameter: Create Empty Folders

FANOUT_TYPE

Required/Optional: Optional

If the value is “folder”, then a single level of folders will be created, where each folder’s name maps to the value of the fanout attribute. If the value is “subfolder”, then a two-level folder hierarchy will be created, where the top-level folder’s name will be the same as the original feature type, and each sub-folder’s name maps to the value of the fanout attribute.

Workbench Parameter: Fanout Type

MOVE_TO_KML_LOCAL_COORDSYS

Specifies whether or not features with model geometry should be reprojected such that the model geometry is a local coordinate system with meter units.

Required/Optional

Optional

Values

  • yes (default): The input feature must have a valid coordinate system, and will be reprojected as necessary.
  • no: The placement location of the model must be specified via format attributes, and the geometry will be written to a COLLADA file as-is.

Note: Google Earth requires the geometry to use values with valid COLLADA units.

Workbench Parameter: Move To Local Coordinate System

WRITE_TEXTURES_TXT_FILE

Specifies whether or not a textures.txt file should be generated to map the texture references in the output COLLADA files to their corresponding texture files.

Required/Optional

Optional

Values

  • yes: A single textures.txt file will be generated for the whole dataset.
  • no (default): Texture mapping will be performed by adding the required <ResourceMap> elements to the Placemark element’s Model geometry.

Note: The OGC KML 2.2 specification has deprecated use of the textures.txt file in favor of ResourceMap elements.

Workbench Parameter: Write texture list to textures.txt

GME_COMPATIBILITY_MODE

Specifies whether or not the KML file should be compatible with Google Maps Engine. Enabling this mode will result in KML files that may fail validation.

Required/Optional

Optional

Values

  • Yes: The type attribute value in the generated schema will not be prefixed with a namespace. Missing, null, or empty user attributes will be written as empty nodes.
  • No (default): Type values in the generated schema will be prefixed, with xsd: as the default prefix. Missing, null, or empty user attributes will not be written.

Workbench Parameter

GME Compatibility Mode