gpsbabel
gpsbabel copied to clipboard
TimeSpan and Point in kml files
When converting the following kml file to gpx, the time information is lost.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:gx="http://www.google.com/kml/ext/2.2">
<Document>
<Placemark>
<TimeSpan>
<begin>2019-04-30T20:35:42.388Z</begin>
<end>2019-05-01T10:00:22.000Z</end>
</TimeSpan>
<Point>
<coordinates>10.760289199999999,59.9298459,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
Converted to gpx:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
<time>2020-01-29T11:13:04.529Z</time>
<bounds minlat="59.929845900" minlon="10.760289200" maxlat="59.929845900" maxlon="10.760289200"/>
<wpt lat="59.929845900" lon="10.760289200">
<ele>0.000</ele>
</wpt>
</gpx>
Since gpx does not support timespan for a waypoint, the best solution is probably to create a track instead:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
<time>2020-01-29T11:11:55.929Z</time>
<bounds minlat="59.929845900" minlon="10.760289200" maxlat="59.929845900" maxlon="10.760289200"/>
<trk>
<trkseg>
<trkpt lat="59.929845900" lon="10.760289200">
<ele>0.000</ele>
<time>2019-04-30T20:35:42.388Z</time>
</trkpt>
<trkpt lat="59.929845900" lon="10.760289200">
<ele>0.000</ele>
<time>2019-05-01T03:18:02.194Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
In general, we don't have internal concepts of timespans for exactly this kind of reason - they translate poorly to less functional formats. You might have a timespan with a style that interpolates icons, for example and we just have no way to write that most GPSes, for example.
This is an area for development for a new volunteer. Marking as enhancement request.
Closing as an inactive/unstaffed area for new development.