feature request: Preserve extensions node (with gpxtpx:TrackPointExtension, eg.: hearth rate)
Closed this issue · 2 comments
It would be nice to manipulate GPX files with extensions
node and preserve that information in the output.
When loading a gpx file with hearth rate information:
...
<trkpt lat="47.6757193" lon="19.0558327">
<ele>163</ele>
<time>2019-05-19T13:12:02.224Z</time>
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>143</gpxtpx:hr>
<gpxtpx:atemp>24.8</gpxtpx:atemp>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
...
the extensions
node is not included in the saved gpx file:
<trkpt lat="47.6757176" lon="19.0552413"><ele>165</ele><time>2019-05-19T08:24:46.016Z</time></trkpt>
Steps to reproduce:
- open https://opoto.github.io/wtracks/
- Load from url: https://gist.github.com/parhuzamos/e70b03a5c478283a8771bdc356ea3486/raw/6f5550487cffdbbd63d12c865541b8c5c77562ab/34km.gpx
- Save as file, the output will have no
extensions
node intrkpt
node.
Hi
Your suggestions makes sense, and I wish I could add it. However WTracks uses a 3rd party lib (togeojson.js) to load GPX files, which internally converts GPX to Geojson format, which does not know about GPX extensions. I am not ready to modify togeojson to add this proprietary extension. Maybe I (or you!) can ask the authors to do it.
However, thanks to your request, I noticed togeojson implemented the support of heart rates (which is not standard Geojson neither). So I added it to WTracks: it now reads and saves heart rates values when present in the original file :) However these values are not displayed nor editable in WTracks.
Thanks