Skip to content
Novus Examples
kml838 B

KML — GroundOverlay and ScreenOverlay

A georeferenced GroundOverlay pinned to the territory's bounding box and a ScreenOverlay anchored to a pixel position. Both reference images that are not present, which is the normal state for a bare .kml and the reason KMZ exists.

Preview — first 27 lineskml
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>Kestrel Bay overlays</name>
    <GroundOverlay>
      <name>Survey raster</name>
      <color>b4ffffff</color>
      <drawOrder>1</drawOrder>
      <Icon><href>overlays/survey.png</href></Icon>
      <LatLonBox>
        <north>47.14</north>
        <south>46.95</south>
        <east>-12.36</east>
        <west>-12.64</west>
        <rotation>0</rotation>
      </LatLonBox>
    </GroundOverlay>
    <ScreenOverlay>
      <name>Scale bar</name>
      <Icon><href>overlays/scale.png</href></Icon>
      <overlayXY x="0" y="0" xunits="fraction" yunits="fraction"/>
      <screenXY x="16" y="16" xunits="pixels" yunits="pixels"/>
      <size x="180" y="24" xunits="pixels" yunits="pixels"/>
    </ScreenOverlay>
  </Document>
</kml>

Specifications

Format
KML 2.2
Namespace
http://www.opengis.net/kml/2.2
Crs
WGS 84 (EPSG:4326)
Coordinate Order
longitude,latitude[,altitude]
Encoding
UTF-8
Line Endings
LF
Ground Overlays
1
Screen Overlays
1
Placemarks
0
Lat Lon Box
-12.64,46.95,-12.36,47.14
Referenced Images
2
Note
referenced images are not bundled — see the KMZ fixtures for that

Testing contract

Expected to pass
Scenario
Open the file and observe how the missing referenced images are handled.
Expected result
The overlays are recognised with their LatLonBox and screen anchors intact, and the two missing image references are reported rather than causing the document to fail to load.

What is a .kml file?

KML (Keyhole Markup Language) is an XML format for representing geographic features, popularized by Google Earth and Google Maps. It supports placemarks, paths, polygons, styling, and overlays with WGS84 coordinates. It is widely used for sharing annotated maps and 3D geospatial content.

How to use this file

Use an example KML file to test geospatial parsing, placemark and style handling, and converters between KML, GeoJSON, and GPX.

How to use this file for testing

“KML — GroundOverlay and ScreenOverlay” is a deterministic Novus Examples fixture for Geospatial, Conversion testing, Error handling. GeoJSON, GPX, and KML files with points, lines, polygons, and tracks — for testing map tools, route parsers, and geo importers.

Documented properties for this file: UTF-8 · LF · KML 2.2. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Geospatial fixtures publish one invented territory across formats, with the coordinate reference system and feature counts documented in specs. Convert or reproject and diff against the twin in the same group; edge-case geometries state exactly which assumption they are built to break.

Generated by generation/geospatial.py. Free for any use, no attribution required — license.