Introduction
KML is the format of Google Earth: places, paths and areas to show on a map or globe, with names, descriptions, icons and colours. It was created by Keyhole, the company whose viewer became Google Earth, and became an Open Geospatial Consortium standard, KML 2.2, in 2008. Google My Maps and many GPS and mapping tools import and export it.
A .kmz file is a ZIP archive holding a
KML file, usually named doc.kml, together with the images and other files
it uses.
Structure
KML is XML. The root element is
<kml> in the namespace http://www.opengis.net/kml/2.2,
usually holding one <Document>. Inside it, <Folder>
elements group <Placemark> elements, and each placemark has a name,
a description and a geometry: <Point>,
<LineString>, <Polygon> or
<MultiGeometry>.
Coordinates are written in a <coordinates> element as
longitude,latitude,altitude triples separated by spaces, in WGS 84.
<Style> elements set icons, line colours and fills, and
<GroundOverlay> drapes an image over the ground.
Links
Software
- Google Earth Pro (Windows, macOS, Linux) and Google Earth on the web
- Google My Maps (web)
- QGIS (Windows, macOS, Linux)
- GDAL and its
ogr2ogrconverter (Windows, macOS, Linux)
Developers
Reference
- OGC KML, the Open Geospatial Consortium standard
- KML Reference, Google