Merge and fix tracks
How to join multi-day stages into one GPX track
Updated
Five days, five activities. Each evening you saved the stage, charged the watch and slept. Now the trip is over and you want to see it the way you experienced it: one line across the map, from the first morning to the last arrival.
Joining stages is a close cousin of merging a split activity, but it has its own quirks. The pieces are long, they are separated by whole nights, and the order matters.
Why stages behave differently
When you merge a ride that was cut in two by mistake, the gap is a few minutes. Between stages, the gap is a night. That changes a few things:
- Elapsed time grows a lot. A track that runs from Monday morning to Friday afternoon spans days, not hours. Any app that reads it as a single workout may show odd totals and averages.
- The line may jump. If you slept in a town and started the next day from a hostel two streets away, the joined track draws a short straight line between the two points. If you took a bus to skip a section, it draws a long one.
- Order is everything. Stages have to go in date order, or the line zigzags across the map.
Segments: the format already thought of this
GPX has a built-in idea for exactly this. In the TopoGrafix documentation, a track is a list of segments, and each segment holds points that are logically connected in order. The documentation adds that a new segment should start whenever GPS reception is lost or the receiver is turned off.
So the cleanest result is one track with one segment per day. Apps that respect segments won’t draw a line across the night. Apps that ignore them will. Learn more about how tracks and routes differ in track vs route vs waypoint.
The method that works today
- Collect every stage as a file. Export each day from wherever it lives. If you’re not sure how, start with how to download the GPS file of your activity. Name the files by date, such as
day-1.fit,day-2.fit, so you can keep them straight. - Combine them with a merge tool. Strava’s help center says Strava can’t merge activities and suggests outside tools: FitFileTools for .FIT files and GOTOES for .TCX, .FIT or .GPX files. GOTOES’s page says it combines FIT, GPX, CSV or TCX files and lists heart rate, position, elevation and temperature among the data it keeps. Add all the stages, press Upload, then Process uploaded files.
- Check the order and the joins. GOTOES’s page doesn’t say how it orders files or handles the time between them, so open the result. Look for straight lines where nights or transfers were, and make sure day 3 doesn’t come before day 2.
- Decide what the joined file is for. For a map, a print or a video of the whole trip, one file is perfect. As a training log entry, a five-day “activity” can confuse your stats. A simple way out: keep the daily activities in your training app and use the joined file only to tell the story.
If you plan to replace the daily activities on Strava with the joined file, its help center says you must delete the originals first, and that their kudos and comments are lost.
A few tips from the road
- Keep the daily files. They are smaller, easier to fix and easier to share one by one.
- Trim before you join. The walk from the hotel to the bike shed is easier to remove from one stage than from a five-day track. See how to trim the start or end of a GPX track.
- Rest days aren’t a problem. A day without a file simply leaves a longer gap in time between two stages.
What Trazo does with stages
Multi-day trips are one of the reasons Trazo, at trazo.run, exists. You give it the stages and they fall into order on their own; any gap between sections is flagged, so a missing bus ride or a forgotten morning is visible before it ends up in the video. Then you can name the huts, summits and finish on the map, pick how long the video runs, and fit every day of the trip into one 3D map video, horizontal or vertical.