KML (Keyhole Markup Language) is an XML-based file format for expressing geographic features—points (placemarks), lines, polygons, ground overlays, and 3D models—along with their styling. Originally developed for Google Earth, it became an Open Geospatial Consortium (OGC) standard in 2008.

Why it matters

KML is the de facto format for sharing simple spatial data with non-GIS audiences, because Google Earth (free and widely installed) opens it directly. For consultants, it is a convenient way to deliver site boundaries, sample locations, or annotated features to clients who do not run desktop GIS. KMZ is simply a zipped KML, often bundling icons and imagery into a single distributable file.

A concrete example

KML coordinates are always stored as longitude, latitude, altitude in that order, in decimal degrees on WGS84 (EPSG:4326). A single placemark looks like:

<Placemark>
  <name>Drill collar BH-01</name>
  <Point><coordinates>-2.345,51.678,0</coordinates></Point>
</Placemark>

You can convert a shapefile or GeoPackage to KML with ogr2ogr -f KML out.kml in.shp, and GDAL/OGR will reproject to WGS84 automatically if needed.

Common pitfall

Because KML is fixed to WGS84 geographic coordinates, it is unsuitable as an analysis format—you cannot measure area or distance reliably in degrees, and projected data must be reprojected on export. KML also has weak support for attribute tables and large datasets; for data interchange between GIS tools, GeoJSON, GeoPackage, or FlatGeobuf are usually better choices.

Related reading