KML — TimeSpan and TimeStamp Time Primitives
Four Placemarks with a `TimeSpan` and one with an instantaneous `TimeStamp`, which is what drives the time slider in a globe viewer. Time is the first thing a KML-to-GeoJSON conversion drops, because RFC 7946 has no place to put it.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Kestrel Bay survey timeline</name>
<Placemark>
<name>Kestrel Bay survey</name>
<TimeSpan>
<begin>2026-01-01T09:00:00Z</begin>
<end>2026-01-15T17:00:00Z</end>
</TimeSpan>
<Point><coordinates>-12.482,47.064</coordinates></Point>
</Placemark>
<Placemark>
<name>Marram survey</name>
<TimeSpan>
<begin>2026-02-01T09:00:00Z</begin>
<end>2026-02-15T17:00:00Z</end>
</TimeSpan>
<Point><coordinates>-12.3915,47.112</coordinates></Point>
</Placemark>
<Placemark>
<name>Holloway survey</name>
<TimeSpan>
<begin>2026-03-01T09:00:00Z</begin>
<end>2026-03-15T17:00:00Z</end>
</TimeSpan>
<Point><coordinates>-12.551,47.018</coordinates></Point>
</Placemark>
<Placemark>
<name>Ninepin survey</name>
<TimeSpan>
<begin>2026-04-01T09:00:00Z</begin>
<end>2026-04-15T17:00:00Z</end>
</TimeSpan>
<Point><coordinates>-12.4402,46.9725</coordinates></Point>
</Placemark>
<Placemark>
<name>Ninepin inspection</name>
<TimeStamp><when>2026-05-04T11:30:00Z</when></TimeStamp>
<Point><coordinates>-12.4402,46.9725</coordinates></Point>
</Placemark>
</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
- Placemarks
- 5
- Time Spans
- 4
- Time Stamps
- 1
- Time Range
- 2026-01-01 to 2026-05-04
- Time Zone
- UTC (Z)
Testing contract
Expected to pass- Scenario
- Convert the document to GeoJSON and look for the time information.
- Expected result
- The five placemarks convert, and their begin/end/when values land in properties rather than vanishing with the KML time elements.
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 — TimeSpan and TimeStamp Time Primitives” is a deterministic Novus Examples fixture for Geospatial, Metadata testing, Time-series data. 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.
Related files
- gpxGPX — Garmin TrackPointExtension (heart rate, cadence, temperature)Eight trackpoints each carrying a Garmin TrackPointExtension with heart rate, cadence and air temperature. The GPX schema deliberately leaves `extensions` open, so this is the fixture for checking that a reader surfaces vendor data instead of discarding it on export.

- kmlKML — extrude With Three Different altitudeMode ValuesFour extruded points whose third coordinate means three different things depending on the `altitudeMode` beside it: ignored when clamped, height above terrain when relative, height above the ellipsoid when absolute. Copying the number without the mode changes what the data says.

- kmlKML — Nested Folders (three levels)Eight Placemarks arranged in three levels of Folder, the hierarchy KML uses for layer trees. GeoJSON has nothing equivalent, so a converter must either flatten and record the path or lose the structure entirely — and this file makes which one it did obvious.

- kmlKML — Shared Styles and a normal/highlight StyleMapShared `Style` blocks referenced by `styleUrl`, plus a `StyleMap` pairing normal and highlight states. KML colours are written aabbggrr rather than the usual rrggbbaa, which is why converted maps so often come out with red and blue swapped.

- geojsonGeoJSON — bbox on Every FeatureThree features that each carry their own bbox. Spatial indexes are often built from these declared boxes instead of the geometry, so a wrong or stale one produces a query that silently misses features.

- geojsonGeoJSON — bbox on the FeatureCollectionThe five towns with a four-element bounding box on the collection, ordered west, south, east, north as RFC 7946 requires. The values are the true extent of the contained points, so a reader that recomputes the box can be scored against the declared one.

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