erik / derive

Generate personal heatmap from GPX/TCX/FIT/IGC data
https://erik.github.io/derive
MIT License
490 stars 62 forks source link

GPX without track points #2

Closed firesharker closed 7 years ago

firesharker commented 7 years ago

Unfortunately my strava dump contains some activities which do not have any <trk> node and cause TypeError during import. It would be nice if the app could ignore them automatically.

erik commented 7 years ago

Ah, didn't consider that stationary trainer rides / other activities would show up in the Strava data dump!

Just to confirm my understanding is right, you'd expect these activities without trackpoints to be entirely discarded, correct?

Thanks for reporting!

erik commented 7 years ago

Would you mind sharing an example GPX file so I can make sure it gets handled correctly? Otherwise I can try creating my own

firesharker commented 7 years ago

Yes, since there is no data to display. Here is one example:

<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="StravaGPX" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
 <metadata>
  <time>2013-04-24T08:01:32Z</time>
 </metadata>
</gpx>

Actually this is not a stationary training ride, but I think they wouldn't be a problem if you check the existence of <trk> node.

erik commented 7 years ago

Updated!

I ended up having it alert when something isn't parsed correctly (since this seems like it would usually be good info) but I'd be open to just silently dropping in cases like your example.

Pushed the changes up to https://erik.github.io/derive/

Thanks again for reporting and please feel free to reopen if I've missed something!