Sustainability of Digital Formats: Planning for Library of Congress Collections

Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact
Format Description Categories >> Browse Alphabetical List

KML, Version 2.2

>> Back
Table of Contents
Format Description Properties Explanation of format description terms

Identification and description Explanation of format description terms

Full name KML (formerly Keyhole Markup Language), Version 2.2
Description

KML is a file format used to display geographic data in a 2-D or 3-D earth browser, such as Google Earth, Google Maps. The markup specification was originally developed by Keyhole, Inc. for use in a product called Keyhole Earth Viewer. Keyhole was acquired by Google in 2004 and the product became Google Earth. KML, version 2.2. was adopted as an international standard in 2008 by the Open Geospatial Consortium, Inc. (OGC).

KML is an XML grammar used to encode and transport representations of geographic data for display in an earth browser (3D) or online map (2D). KML encodes what to show and how to show it, using a tag-based structure with nested elements and attributes. KML focuses on geographic visualization, including annotation of maps and images. KML files can pinpoint locations, add image overlays, and expose rich data through icons and captions. KML can support not only the presentation of data on the globe, but also control the user's navigation in the sense of directing where to go and where to look.

KML relies on a single Coordinate Reference System, which is not referenced explicitly in KML files. The encoding of every kml:Location and coordinate tuple uses geodetic longitude, geodetic latitude, and altitude (in that order) as defined in Annex A of the KML specification by the GML Coordinate Reference System (CRS) with identifier LonLat84_5773. The vertical datum, used for altitude measurements is the WGS84 EGM96 Geoid.

KML files are very often distributed in KMZ files, which are zipped files with a .kmz extension. A KMZ file contains a single root KML document, typically a file named "doc.kml" at the root directory level but the first .kml file entry in the KMZ file is the actual one selected in Google Earth regardless of its name. Files for referenced overlays, images, icons, etc., including network-linked KML files, can be included. Referenced files are typically in subdirectories. To be compatible with all geobrowsers, the zip file should use no compression or DEFLATE compression (i.e. be compatible with the 1993 PKWARE 2.0 version of the ZIP specification, as registered with IANA). See KMZ for more details.

The KML format supports dynamic incorporation of remote KML data. Hence a single KML or KMZ file may not be complete. For real-time use this feature is useful to reduce the needed bandwidth.

Production phase Primarily a final phase format for delivery of data ready for visualization in an earth browser or in a map displayed online or on a mobile phone. Also a convenient format for use by non-specialists using mass market tools to assemble data to share or re-use for a specific purpose.
Relationship to other formats
    Defined via XML_Schema, W3C XML Schema Language
    Affinity to GML, Geography Markup Language. KML 2.2 utilizes some basic geometry elements from GML 2.1.2: point, line string, linear ring, polygon.
    Used by KMZ, KML Zipped
    Has later version KML version 2.3, not described separately on this website at this time.

Local use Explanation of format description terms

LC experience or existing holdings The Library of Congress has a small number of KML files in its collections.
LC preference The Library of Congress Recommended Formats Statement (RFS) lists KML as an acceptable format for Geographic Information System (GIS) - Vector images. The RFS does not specify a version of KML.

Sustainability factors Explanation of format description terms

Disclosure An openly documented format adopted as an implementation standard, by the Open Geospatial Consortium (OGC), an international voluntary consensus standards organization.
    Documentation Available from OGC, OGC 07-147r2 (PDF download). Related documents at http://www.opengeospatial.org/standards/kml/. Schema at http://schemas.opengis.net/kml/.
Adoption

Widest use is through popular applications from Google: Google Earth and Google Maps.

The range of users is described in very similar wording in both the specification (quoted here) and at KML Developers FAQ: Who uses KML? (consulted in April 2012): "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 ventures. 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." These users are not necessarily aware that they are using KML; they may simply be using an application that uses KML to save user data.

As of early 2012, KML is supported in professional tools such as ESRI ArcGIS and consumer tools such as Bing Maps from Microsoft. It is also supported in Marble, a software library for virtual globe and atlas browsing in educational contexts, based on KDE, an open source toolkit.

Government agencies and other producers of GIS data have started making some data available in KML, particularly derivative data intended for use in particular professional or recreational contexts and for educational use. It was endorsed by FGDC (Federal Geographic Data Committee) as an external standard in 2010, and a 2011 survey indicated that almost half of the responding agencies made use of it. Examples of data made available in KML include:

    Licensing and patents No known license or patent concerns for generation and use of the format. Comments welcome.
Transparency Based on XML and hence readable with a basic text viewer or editor. KML uses human-readable tags and a simple model that makes a KML instance document understandable on its own. KML instances have a predictable structure. KML defines an extension mechanism; extensions may be less easy to interpret.
Self-documentation TBD.
External dependencies None.
Technical protection considerations TBD

Quality and functionality factors Explanation of format description terms

GIS images and datasets
Normal functionality

KML is an XML language designed to support geographic visualization in 2D (on a map) or 3D (on a globe), including annotation of maps and images. Hence it can be used to specify layers for use in creating maps in a GIS system.

Quoting from the specification, KML can be used to:

  • Annotate the Earth
  • Specify icons and labels to identify locations on the surface of the planet
  • Create different camera positions to define unique views for KML features
  • Define image overlays to attach to the ground or screen
  • Define styles to specify KML feature appearance
  • Write HTML descriptions of KML features, including hyperlinks and embedded images
  • Organize KML features into hierarchies
  • Locate and update retrieved KML documents from local or remote network locations
  • Define the location and orientation of textured 3D objects
Support for GIS metadata KML has very limited support for metadata as recommended by ISO 19115 or FGDC. The coordinate reference system in use is implicit, in that KML uses a single CRS.
Support for grids Not designed to support grid-based analysis.
Beyond normal functionality Many features of KML that support web-based visualization aspects are beyond the normal functionality of geospatial data formats. These include support for styling, embedding HTML for captions, incorporating textured 3D models, etc. Support for incorporating remote KML data is also a special feature.

File type signifiers and format identifiers Explanation of format description terms

Tag Value Note
Filename extension kml
From registration at IANA.
Internet Media Type application/vnd.google-earth.kml+xml
See registration at IANA.
Pronom PUID fmt/244
See http://www.nationalarchives.gov.uk/PRONOM/fmt/244.
Wikidata Title ID Q79587
See https://www.wikidata.org/wiki/Q79587.

Notes Explanation of format description terms

General

The OGC KML standard provides a mechanism for extensions - additional elements that contain information beyond what is available in the standard (learn more about XML namespaces at w3.org). With the launch of Google Earth 5.0, Google provided extensions to KML to support a number of new features, including support for "tours." These extensions use the gx prefix and the following namespace URI: xmlns:gx="http://www.google.com/kml/ext/2.2"

KML is a language for the visualization of geographic information tailored for Google Earth and similar spatial browsers. In contrast, GML is a language to encode geographic content for any application. KML can be used to carry GML content, and GML can be “styled” to KML for the purposes of presentation. KML instances may be transformed losslessly to GML, however roughly 90% of GML's structures (such as, to name a few, metadata, coordinate reference systems, horizontal and vertical datums, etc.) cannot be transformed to KML.

History The IANA mediatype application for KMZ states that "KML is an acronym for Keyhole Markup Langage, which stems from the time before the Keyhole Corporation was acquried by Google, and their Keyhole application redesigned and rebranded as Google Earth."

Format specifications Explanation of format description terms


Useful references

URLs


Last Updated: 08/10/2022