Note: The KML format is described in detail in the KML Documentation Introduction at http://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: http://developers.google.com/kml/documentation/kmlreference.
The Google Earth KML Reader and Writer allow FME to read and write KML files. This chapter refers to the Reader and Writer as the KML Reader/Writer.
“KML is an XML grammar used to encode and transport representations of geographic data for display in an earth browser. Put simply: KML encodes what to show in an earth browser, and how to show it. KML uses a tag-based structure with nested elements and attributes and is based on the XML standard.
The KML community is wide and varied. Casual users create KML Placemarks to identify their homes, describe journeys, and plan cross-country hikes and cycling adventures. Scientists use KML to provide detailed mappings of resources, models, and trends such as volcanic eruptions, weather patterns, earthquake activity, and mineral deposits. Real estate professionals, architects, and city development agencies use KML to propose construction and visualize plans. Students and teachers use KML to explore people, places, and events, both historic and current. Organizations such as National Geographic, UNESCO, and the Smithsonian have all used KML to display their rich sets of global data.
KML documents and their related images (if any) may be compressed using the ZIP format into KMZ archives. KML documents and KMZ archives may be shared by e-mail, hosted locally for sharing within a private internet, or hosted on a web server.”
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/.
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.
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 created two plug-ins capable of reading and writing KML datasets: KML and OGCKML.
The KML plug-in is the original KML plug-in designed to read and write KML 2.0 datasets, and this OGCKML plug-in is designed to conform to the latest KML 2.2 specification.
The older KML plug-in is now deprecated. Translations using the older KML plug-in should be migrated to this new plug-in, which has many more features.
FME Knowledge Center
View a list of KML Transformers. Enter KML in the search bar.