How can I get a full GPX data?

1,064 views
Skip to first unread message

SangHwan Jun

unread,
Oct 23, 2017, 2:32:39 AM10/23/17
to Strava API
Hi~ I'm developing functions using a Strava API.
Is there anyone who know any Strava API which it can get only GPX data from full data?
If it doesn't exist, how can I get only GPX data from full data?
If someone knows the method, please notice me.
Thank you.

ps: My English skill is not good, so you can feel strange from my sentence.


Xdadsd Asdadsa

unread,
Oct 29, 2017, 6:29:04 AM10/29/17
to Strava API
I know no direct way to get GPX data from Strava API, but you can use streams https://strava.github.io/api/v3/streams/#activity get required data (time, location, altitude, etc) and recreate GPX file.

rao loka

unread,
Nov 9, 2017, 12:32:56 PM11/9/17
to Strava API
The data I get from the stream has lot fewer "trackpoints" than I got using the export_tcx method. For example, for one of my rides (over 100 miles), the "stream" gives only about 28000 points, whereas using export_tcx (visiting activities/id/export_tcx) gives about 380000 trackpoints. Does anyone have any rationale for the difference?

Xdadsd Asdadsa

unread,
Nov 11, 2017, 3:11:33 PM11/11/17
to Strava API
Is it really 380000 vs 28000, or 38000 vs 28000 ?
Anyway, I've just done some checking, and for over 100 miles ride, the "stream" gives me 14353 points, export_tcx gives 14353 points, export_gpx gives 14353 points - so it seems to work correctly.

One thing that came to my mind are privacy zones (see note on https://strava.github.io/api/v3/streams/#activity ):
"Stream requests made using a public access_token will be cropped with the user’s privacy zones, regardless if the requesting athlete owns the requested activity. To fetch the complete stream data use an access_token with view_private permissions.". Would it crop 10000 points? I do not know, but it seems possible in some cases.

rao loka

unread,
Nov 15, 2017, 3:51:48 PM11/15/17
to Strava API
 Yes, it is indeed orders of magnitude different. I had access permissin as VIEW_PRIVATE_WRITE and thought that may be the problem. But even after I changed VIEW_PRIVATE, there is a big discrepancy. I tried a shorter ride, about 32 miles. export_tcx gives about 107000 "trackpoints" while the stream has ony about 8000 points. Not sure what causes it ...

Xdadsd Asdadsa

unread,
Nov 17, 2017, 1:34:59 PM11/17/17
to Strava API
Would you mind uploading both tcx file and strava stream here so that we could compare them? even for the shortest ride where you experienced such big discrepancy?

Let's say that you record a trackpoint every 1 second. So 107000 points would result in about 30 hours of ride, on the other hand 8000 points  is about 2.5 hours which seems more likely for 30 miles ride. Aren't you misinterpreting number of lines in tcx file as number of trackpoints? For 7943 trackpoints I'm getting 111291 lines in tcx file...

Anyway, uploading tcx file would be beneficial.

rao loka

unread,
Nov 22, 2017, 6:22:54 PM11/22/17
to Strava API
Oops! My mistake. You're absolutely right!
I overlooked the fact that xml viewer I was using was counting the field,attribute, whatever, for each track when listing the trackpoints when listing the line numbers (even when I had the trackpoints folded).
Thanks again for clarifying ...
   - Rao.
Reply all
Reply to author
Forward
0 new messages