Bicycles Stack Exchange is a question and answer site for people who build and repair bicycles, people who train cycling, or commute on bicycles. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a recent ride, my GPS stopped functioning about half way through. From other sources I have approximate times for the missing data and I know the route, so (in principle, though I'm really not sure how) I could manually create a track for the second half of the ride. But how do I combine this data with the GPS data from the first half of my ride?

Is there a way to take two separate GPX tracks and combine them into a single one? What issues arise in "syncing" overall times, speeds, etc.? Are there tools that assist in reconciling them?


locked by Gary.Ray Mar 18 at 12:36

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

I think they're basically XML files (if they're like TCX), so, with a bit of careful cut-and-paste you may be able to remove the headers and footers, then insert the extra bit before the footer of the original. See also – James Bradbury Aug 19 '13 at 14:29
THe hard part is getting the gpx for the missing part of the route. You can create a route in google maps and export it to KML (google's format). Then use GPSBABEL to convert KML to GPX. You can then manually merge the two gpx files in an editor. – Angelo Aug 19 '13 at 14:35
@JamesBradbury: That's a good idea. Simple cut and paste in a text editor might do the trick. As Angelo says though, I'm finding the hard part (despite suggestions here) to be creating the missing route. – 2u2 Aug 19 '13 at 14:49
@Angelo: Is there a way to make the process of creating a route for tie missing data less painful. What I have for that is (1) times at a few milestones and (2) the route. But it's not clear how to use that to create a "ride" without a lot of calculation and tedious work. There must be some way to take that information (even just a start, and end and a route) and create an "averaged" ride, but I can't find it. – 2u2 Aug 19 '13 at 14:51
I'm voting to close this question as off-topic because software is off topic for this stack. Please ask your question on and use the Cycling tag. – Criggie Mar 18 at 2:10
up vote 13 down vote accepted

GPX files are XML files, which means you can edit them in a text editor. I use Notepad++ on Windows and TextWrangler on OSX, but you should be able to use the built-in Notepad or TextEdit. Don't use a word processor like Word or OpenOffice.

  1. Open the second GPX file in a text editor. Copy all the stuff between <trk> and </trk> inclusive.
  2. Open the first GPX file in a text editor. Paste the copied stuff after the </trk> line near the end of the first file and save.
  3. If you have more files, repeat.
Yeah, if you use Notepad++, you can get a lot of help from the XML Tools Plugin. Many GPS units won't save the files nicely formatted with line breaks and indented lines, but a couple clicks using the XML Tools plug in can fix this up really easily. – Kibbee Oct 7 '13 at 13:10
By 'inclusive' you mean including the <trk></trk> tags? – FandangoAus Aug 20 '14 at 2:38
@FandangoAus, Yes, that's right. – Hugo Aug 20 '14 at 6:49

Try gpsbabel (either as commandline tool or via gpsvisualizer).
You can find an explanation how to combine files at

GPSBabel is a bit of overkill for simple merges. In fact, it has large but odd collection of capabilities. So far, it looks like simple text editing does the trick. GPX files are (it turns out; I didn't realize when I started) pretty simple XML files. Combining them is straightforward with a text editor. – 2u2 Aug 21 '13 at 18:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.