14
votes

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?

10
  • 4
    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 gis.stackexchange.com Aug 19, 2013 at 14:29
  • 1
    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, 2013 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.
    – orome
    Aug 19, 2013 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.
    – orome
    Aug 19, 2013 at 14:51
  • 1
    I'm voting to close this question as off-topic because software is off topic for this stack. Please ask your question on softwarerecs.stackexchange.com and use the Cycling tag.
    – Criggie
    Mar 18, 2016 at 2:10

2 Answers 2

13
votes

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.
3
  • 1
    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, 2013 at 13:10
  • By 'inclusive' you mean including the <trk></trk> tags?
    – Fandango68
    Aug 20, 2014 at 2:38
  • @FandangoAus, Yes, that's right.
    – Hugo
    Aug 20, 2014 at 6:49
5
votes

Try gpsbabel (either as commandline tool or via gpsvisualizer).
You can find an explanation how to combine files at http://www.gpsbabel.org/htmldoc-development/Advanced_Usage.html

1
  • 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.
    – orome
    Aug 21, 2013 at 18:57

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