Forum » General Forums » Mapping
I have recently designed sections of a long distance path, downloading each section as it was finished. I now need to link them altogether to show the complete route. Has anyone any advise on how to do this please? I have tried to copy and paste individual sections within my downloads folder, but that did not work. Help!
What you need is a text editor, and I do mean a text editor, not MS/Word. The sort of editor you would use to edit programs (so vi or emacs or similar for Linux, notepad possibly for Windows if they still offer that - spot the man who doesn't use Windows).
GPX files are just plain text XML files, the format is pretty obvious once you've seen one. For example here's a route1 I've just made around Grasmere:
<?xml version="1.0"?>
<gpx version="1.1"
creator="The Hug - http://maps.the-hug.net/"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns<img src="/forum/emoticons/icon_mad.gif" alt=":x" title="Mad" />si="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1
http://www.topografix.com/GPX/1/1/gpx.xsd">
<rte>
<name>Example</name>
<rtept lat="54.45774" lon="-3.02474">
<name>1:</name>
</rtept>
<rtept lat="54.45306" lon="-3.03179">
<name>2:</name>
</rtept>
<rtept lat="54.44602" lon="-3.02452">
<name>3:</name>
</rtept>
<rtept lat="54.44230" lon="-3.01795">
<name>4:</name>
</rtept>
<rtept lat="54.44333" lon="-3.01250">
<name>5:</name>
</rtept>
<rtept lat="54.45502" lon="-3.01734">
<name>6:</name>
</rtept>
<rtept lat="54.45726" lon="-3.02380">
<name>7:</name>
</rtept>
</rte>
</gpx>
As you can see a route starts and ends with <rte>...</rte> tags and each route point starts and ends with <rtept>...</rtept> tags. So what you do is concatenate the route GPX files together within your editor and then edit the combined file so that all the <rtept>...</rtept> route points are contained within one <rte>...</rte> route.
Edit: oh yes, and once you're done you can validate you new GPX file using an online validator like Validome.
To follow up on this one mloclam43 and I continued this discussion privately and it turned out first of all that he was talking about tracks (where you've been) rather than routes (where you intend to go) although the same basic principle as I described above still works: a track1 is just another XML file but with each track marked with <trk>...</trk> and each track point marked with <trkpt>...</trkpt> tags so you can still merge the tracks together using a text editor.
However there is an alternative. The excellent GPSVisualiser site has a a web form where you can upload your GPX tracks and it then gives them back to you in one merged file.
They're still separate tracks within the GPX file but if you want them merged into one track you can then can use our track editor. Load the merged track into our mapping application and choose to join the tracks together for display purposes. Then click the "route mode" button to toggle into track mode, right click on the track with your mouse (to delete the point under the walker) and ctrl-right click to put it back. You'll now see a new "GPX" link in the "Your Track" box which lets you download the "edited" track.