OGC/Google KML Reader/Writer

FME can read and write Google Earth KML files. This chapter refers to the Reader and Writer as the KML Reader/Writer.

Note  The KML format is described in detail in the KML Documentation Introduction at https://developers.google.com/kml/documentation. Users who want to create complex KML should familiarize themselves with the KML 2.2 specification that is available on Google's website: https://developers.google.com/kml/documentation/kmlreference.

OGC Google KML Product and System Requirements

Format

FME Platform

Operating System

Reader/Writer

FME Form

FME Flow

FME Flow Hosted

Windows 64-bit

Linux

Mac

Reader

Yes

Yes

Yes

Yes

Yes

Yes

Writer

Yes

Yes

Yes

Yes

Yes

Yes

Note   Users who want to create complex KML should familiarize themselves with the KML 2.2 specification that is available on Google's website: https://developers.google.com/kml/documentation/.

Reader Overview

The KML reader reads KML datasets that conform to the KML 2.0, 2.1, and 2.2 specifications. The KML Writer will write datasets that conform to the KML 2.2 specification. In addition the KML Writer also support’s writing Google’s ‘gx’ extensions to the KML 2.2 specification.

FME's KML support can be used without knowledge of the KML specification.

Writer Overview

The KML writer is capable of creating uncompressed (.kml) and compressed (.kmz) KML documents.

Note   All Z values are interpreted in meters, so you may need to manually convert between feet and meters.

The writer dataset 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.

Coordinate System Reprojection

The writer will automatically reproject features to LL-WGS84 if they are tagged with a different coordinate system.

FME Community

How to Convert and Style KML

View a list of KML Transformers. Enter KML in the search bar.