Anyone know how to merge two garmin ride files

rick81721

Lothar
I found a java program on garmin connect but it didn't seem to work - seemed to capture the data from two consecutive gpx files but I get an error when I upload (but maybe I'm saving it on notepad in the wrong format?).
 
Are you trying to overlay two routes on the same map? that is possible. Not sure if you can "follow" two loops; I have not tried that, but I assume its impossible.
 
Are you trying to overlay two routes on the same map? that is possible. Not sure if you can "follow" two loops; I have not tried that, but I assume its impossible.

No trying to merge two consecutive files. It's supposed to be possible. I did a 63 mile ride yesterday but the gps stopped at 51 and I had to start a second file
 
Theoretically you should be able to open both up in notepad (or something better) and copy and paste. I would just copy the <trkpt> tags from one the the end of the other in between the last <trkseg></trkseg>. You have to be careful that all the closing tags in the resulting file lines up otherwise it will be an invalid xml file. An xml editor will let you know if you've messed anything up.

Also, I'm not sure if the timestamp on each point will mess things up. Are they rides that were done one after the other?
 
Also try resulting file from the java program merge up to Everytrail. I've found that sometimes Garmin doesn't like it when you are missing some headers. Everytrail is more forgiving, at least 2yrs ago.
 
Soundz has it, that's the easiest way. I've done it a million times and as long as you pay attention to the details it will work. In case you're not aware a GPX file is built like this (loosely...)

A bunch of header bullshit up top (leave this alone)
<gpx> = the opening tag for the gpx
<trk> = the opening tag for the first track in the gpx
<trkseg> = the opening tag for the first track segment of the track
<trkpt all the GPS information blah blah blah></trkpt> repeat for each GPS log in the file
</trkseg> closing tags
</trk> closing tags
</gpx> closing tags

You can just copy everything between <trkseg> and </trkseg> (including the tags) from the second file and paste it immediately after the last </trkseg> in the first file
 
Wow, someone is trying too hard to win the Wherever I May Roam contest! :)

Haha... no this doesn't qualify. It's just that it was my longest ride ever and it got split into two because I panicked and started a second file when I thought it stopped recording.

I''l try rlb and soundz recos tonight. I tried the same strategy but didn't do it right and was getting error messages.
 
Haha... no this doesn't qualify. It's just that it was my longest ride ever and it got split into two because I panicked and started a second file when I thought it stopped recording.

I''l try rlb and soundz recos tonight. I tried the same strategy but didn't do it right and was getting error messages.

rename the result with a .xml suffix, and open it in IE or Chrome - it will color/indent/fold the results which may id the error (chrome developers panel will probably give you the line and the error shift+ctrl+I)

if ya get stuck, i'll glue them together for ya..
 
rename the result with a .xml suffix, and open it in IE or Chrome - it will color/indent/fold the results which may id the error (chrome developers panel will probably give you the line and the error shift+ctrl+I)

if ya get stuck, i'll glue them together for ya..

Pat I tried but when it opens in IE it's just a blank screen. help!
 
done and link emailed.

wordpad did a nice job of formatting the XML - made it easy to
see where to paste in the trkpt data inside the trkseg block.

didn't try the multiple trkseg approach, but that should work too.
 
Last edited:
Back
Top Bottom