KML / KMZ (.kml, .kmz)
KML, Keyhole Markup Language, is the XML format Google Earth uses to describe places, lines and shapes on a map. KMZ is the same thing zipped, with the icons and images the file needs bundled alongside it.
At a glance
| Extension | .kml, .kmz |
| Encoding | xml |
| Media type | application/vnd.google-earth.kml+xml |
| Invented | 2004 |
| By | Keyhole, Inc. — acquired by Google in 2004 |
| Current version | 2.3, published by the OGC on 4 August 2015 |
History
KML was created by Keyhole, Inc. for its Earth Viewer product. Google acquired Keyhole in 2004 and the viewer became Google Earth. Google handed the format to the Open Geospatial Consortium, which approved KML 2.2 as an international standard on 14 April 2008; KML 2.3 followed on 4 August 2015 and is the current standard.
Where it is used
KML is native to Google Earth and to the "My Maps" feature of Google Maps, which is where most people meet it. Beyond Google it is read by mainstream GIS software including QGIS, ArcGIS and Marble, and by many route planners that offer a "view in Google Earth" export.
Structure
A KML file is XML built around Features — Placemarks (a named point), LineStrings and Polygons, grouped into Folders and Documents. Coordinates are written as longitude, latitude and optional altitude, in that order, which is the reverse of the latitude-first convention most GPS formats use. Styles control colour, line width and icons. A KMZ file is an ordinary ZIP archive holding one root KML document plus any overlays, icons and 3D models it references.
How widespread
KML is the standard way to hand a map picture to someone else. It is a visualisation format rather than a navigation format, so a GPS device will usually want GPX instead — but for showing a route on a screen, KML is what nearly every tool understands.
RouteConverter support
| Reads | Google Earth 3, Google Earth 4, Google Earth 4.2, Google Earth 5, Google Earth 3 Compressed, Google Earth 4 Compressed, Google Earth 4.2 Compressed, Google Earth 5 Compressed |
| Writes | Google Earth 3, Google Earth 4, Google Earth 4.2, Google Earth 5, Google Earth 3 Compressed, Google Earth 4 Compressed, Google Earth 4.2 Compressed, Google Earth 5 Compressed |
RouteConverter reads and writes KML 2.0, 2.1, 2.2beta and 2.2 and their zipped KMZ counterparts. The format names in the list above use Google Earth's product numbering, which is how the versions were shipped: Google Earth 3 is KML 2.0, Google Earth 4 is KML 2.1, Google Earth 4.2 is KML 2.2beta and Google Earth 5 is KML 2.2.