Editing a GPX/TCX from a Garmin?

theboykidney
theboykidney Posts: 95
edited October 2012 in Road general
So, just finished a London to Paris and back, and I merged all the days into a single file. But the problem is that it joins the end of one day, to the beginning of the next (ferry crossings etc.) and ideally I'd like to cut that out somehow.
Is this possible?

Cheers,
TBK.

Comments

  • adr82
    adr82 Posts: 4,002
    It's certainly possible, the data is stored as plain XML and there are loads of around tools to edit that. You can even do it by hand. However I think there are existing apps/websites that are designed to let you do things like this with tcx files, I'd suggest poking around on Google before you do anything else.

    I don't understand what you're trying to accomplish though. Why did you merge the individual days in the first place if you didn't want to include the parts you didn't cycle? Whatever tool you used to merge them will have been designed with the assumption you have 2+ .tcx files that correspond to different parts of a single longer ride, so that's why it'll join the start of one ride to the end of the previous ride.

    If you want to have a single tcx file containing all the sections of the route you actually rode then you can probably do that from what I remember of the XML format the Garmin devices use, but I don't see what that would gain you over having the individual sections in separate files and it might cause problems if you try uploading it to Garmin Connect or a similar site as I guess they assume a single ride per file.
  • There are GPX editing programs out there. I found that EasyGPX strips timing data though, so avoid that one. GPXEditoris opensource.

    You can also do it by hand using a simple text editor (e.g. Notepad), but its a faff. You can add tags between the different segments in the GPX file. Such as:
    <trk>
     <name>Name of Section</name>
     <desc>Description</desc>
     <trkseg>
    ...All the waypoints in the section...
    </trkseg>
    </trk>
    
    The difficult bit is finding exactly where to put that. That's where google earth comes in. Open the original GPX file in GE and you'll get all the trackpoints marked. find/click on the trackpoint at the start of a segment. That should pop up with a box giving you time & location data. Search for any one of latitude, longitude or time in the text editor (though watch for GE rounding up at the 6th decimal). Confirm the other bits are consistent. You want the the <trk> to <trkseg> bit before that. Then go back to GE, click on the last trackpoint you want to include. Again, search for the lat, long or time. Then put the </trkseg></trk> after that point.

    Hope that helps
  • I'm not sure you can easily dit it the way you suggest but I find that the best place to post is in the Garmin Connect forum - people will often do the editing for you and repost it for you. They have done this for me whn the Gramin didn't finish properly.
  • So, just finished a London to Paris and back, and I merged all the days into a single file. But the problem is that it joins the end of one day, to the beginning of the next (ferry crossings etc.) and ideally I'd like to cut that out somehow.
    Is this possible?

    Cheers,
    TBK.
    Download a copy of basecamp from Garmin, edit the gpx track to your hearts content. The track editing tools allow joining of tracks, splitting tracks, adding points, moving points etc.