Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing type in GPX saved to Dropbox? #574

Open
mackuba opened this issue Apr 23, 2023 · 0 comments
Open

Missing type in GPX saved to Dropbox? #574

mackuba opened this issue Apr 23, 2023 · 0 comments

Comments

@mackuba
Copy link

mackuba commented Apr 23, 2023

I'm wondering why the GPX exported from Runkeeper/Strava into Dropbox does not include activity type information inside the file. Is this on purpose or just because it wasn't needed?

This is how a GPX saved in Strava and downloaded from Strava starts - includes type "9" meaning run:

<gpx creator="StravaGPX iPhone" 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 http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
 <metadata>
  <time>2016-11-21T07:25:02Z</time>
 </metadata>
 <trk>
  <name>Morning Run</name>
  <type>9</type>
  <trkseg>

And this is how it looks in Dropbox saved by Tapiriik - name is there but the type isn't:

<gpx xmlns:gpxdata="http://www.cluetrust.com/XML/GPXDATA/1/0" xmlns:gpxext="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns="http://www.topografix.com/GPX/1/1" creator="tapiriik-sync">
  <metadata>
    <name>Morning Run</name>
  </metadata>
  <trk>
    <name>Morning Run</name>
    <trkseg>

This also means that if an activity is saved to Dropbox with a filename template that doesn't include the type in the pattern, then it can't be imported back into another service from there, because the type information was lost…

I'm mostly asking because I'm thinking about building some kind of app that lets me browse all past workouts by parsing GPX files, and getting the type info from a tag inside the GPX file seems like a much safer method than trying to guess it from the filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant