use cases

GPS Tracks With Timestamps and What Happens to Them in GeoJSON

A GPS track in KML is more than a line. Google’s gx:Track element stores a time for every position, so a ride, a run or a vehicle’s day can be replayed, measured for speed and matched against other data by time. Fitness devices and tracking apps also attach values per point, such as heart rate or speed, as SimpleArrayData.

A plain conversion to GeoJSON turns the track into a LineString, and the times are gone. The line is still there, so it looks fine on a map, until someone asks how long a stretch took.

Converting a Ride

$ ikml convert ride.kml ride.geojson --report
Converted ride.kml (kml) to ride.geojson (geojson, 603 bytes).

What changes from kml to geojson:

  [CHANGED] Styles and colors (1)
    GeoJSON has no styling. 1 placemark uses 1 shared style. iKML keeps line
    color and width, fill color and opacity, and marker color as
    simplestyle-spec properties (stroke, stroke-width, stroke-opacity, fill,
    fill-opacity, marker-color) for 1 of them. Mapbox, geojson.io and GitHub
    read these; most other tools ignore them.

  [LOST] Per-point track data (SimpleArrayData) (1)
    Values recorded for each track point, such as heart rate or speed, are
    dropped.

  [KEPT] TimeStamp and TimeSpan (1)
    Kept as "timestamp", "begin" and "end" properties. GeoJSON has no
    standard time field, so time sliders will not pick them up.

  [CHANGED] GPS tracks (gx:Track) (1)
    Each track becomes a LineString. The time of every point is kept in a
    "coordTimes" array property, the convention used by Mapbox's togeojson.

  [LOST] Altitude mode (1)
    1 geometry sets an altitude mode (relativeToGround, absolute and so on).
    GeoJSON keeps the altitude number but not what it is measured from.

Before: 0 error(s), 0 warning(s). After: 0 error(s), 1 warning(s).

ikml convert reporting what a GPS track keeps and loses on the way to GeoJSON: per-point times kept as coordTimes, per-point sensor values and the altitude mode lost.

iKML keeps the times. Each track’s positions become a LineString, and the time of every position goes into a coordTimes array property, in the same order. That’s the convention Mapbox’s togeojson library uses, so tools that understand it can rebuild the timing. The per-point sensor values have no such convention and are dropped, and the report says so rather than leaving you to notice.

The Warning That Appears After

The last line of the report says the converted file has a warning the original didn’t. Checking it shows why:

$ ikml check ride.geojson
ride.geojson (geojson, 603 bytes)

  WARNING duplicate-points  Feature #1 'Ride 2026-10-12'
          The line has 1 position repeated right after itself.

0 error(s), 1 warning(s), 0 note(s).

The GPS logged the same position twice in a row, probably while the rider was stopped. In a track, that’s normal: each point has its own time, so a repeat means “still here”. Once the track is a plain line, the times live in a separate property and the repeat looks like a mistake. iKML’s clean leaves GPS tracks alone for exactly this reason, and only removes repeats from ordinary lines.