Thread: Strava Editing
View Single Post
Old 09-12-17 | 02:03 PM
  #32  
jefnvk's Avatar
jefnvk
Senior Member
 
Joined: Apr 2015
Posts: 8,206
Likes: 86
From: Metro Detroit/AA

Bikes: 2016 Novara Mazama

Originally Posted by Nachoman
Are you winning?/
Sometimes!

Originally Posted by Milton Keynes
I wish there was a way to join a couple of Strava rides together. On my century ride, I meant to turn off the display on my phone, since it was going to me a long ride and use up a lot of battery power if I left it on. Unfortunately instead of just turning off the display I ended the session, but quickly started a new session. Oh well, it still shows 102 miles for the day, but still shows it as two separate rides. I'm not too worried about it, though, because I know I got the century and the total miles are what I'm after.
You have to negotiate a bit of XML, but you can download both GPXs, and copy and paste the second one onto the end of the first one, and reupload it.

Say these were your two files you copied and pasted into the same file:

<?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 Loading site please wait... Loading site please wait... Loading site please wait... http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd">
<metadata>
<time>2017-09-06T21:01:54Z</time>
</metadata>
<trk>
<name>Afternoon Ride</name>

<trkseg>


<trkpt lat="42.6268860" lon="-83.2485170">
<ele>278.3</ele>
<time>2017-09-06T21:01:54Z</time>
</trkpt>

.... (more trkpt objects) ...

<trkpt lat="42.6807660" lon="-83.1310960">
<ele>224.7</ele>
<time>2017-09-06T21:31:36Z</time>
</trkpt>


</trkseg>

</trk>
</gpx>

<?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 Loading site please wait... Loading site please wait... Loading site please wait... http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd">
<metadata>
<time>2017-09-06T21:01:54Z</time>
</metadata>
<trk>
<name>Afternoon Ride</name>

<trkseg>



<trkpt lat="42.6268860" lon="-83.2485170">
<ele>278.3</ele>
<time>2017-09-06T21:01:54Z</time>
</trkpt>

.... (more trkpt objects) ...

<trkpt lat="42.6807660" lon="-83.1310960">
<ele>224.7</ele>
<time>2017-09-06T21:31:36Z</time>
</trkpt>


</trkseg>

</trk>
</gpx>

You would delete everything in red italics, from the </trkseg> in the first file's content to the <trkseg> in the second file. Upload that, and you should have a complete ride.

Of course, make sure you reupload it BEFORE deleting your original rides, and verify it looks right before getting rid of them. I hold no responsibility for XML editing gone wrong!
jefnvk is offline  
Reply