5

How can I merge two GPX files into one?

Read the above link but my gpx files do not seem to have this in them:

Copy all the stuff between Open the second GPX file in a text editor. Copy all the stuff between <trk> and </trk> inclusive

I exported my ViewRanger file and saved the gpx file then opened in Windows Notepad. There is no <trk> and </trk> anywhere.

The first line of the file, opened in Notepad is:-

<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/0" version="1.0" creator="ViewRanger - http://www.viewranger.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

See this dropbox link for one of the files:-

https://www.dropbox.com/s/g7i5afte16zel6n/End%20to%20End%20-%20Day%201%20-%20Lands%20Ends%20to%20St%20Just.gpx?dl=0

I need to merge 18 files (Lands End to John O Groats)

What am I doing wrong?

  • So if you search for "trk" in the file, nothing is there? – Batman Oct 18 '14 at 17:54
  • could be its not a track I suppose. Any chance you could put the files somewhere, and one of us can eyeball them? – PeteH Oct 18 '14 at 20:07
  • Look further down in the file. This is the xml header describing what the nature of the document. – Rider_X Oct 18 '14 at 20:13
  • What platform did you use to do the export? While I support the Rider_X comment and @Batman's question, it could also be that the EOL characters are wrong. Most Windows software expect CR/LF. This link says the export format is platform dependent. – andy256 Oct 19 '14 at 3:57
  • Yes, spot on @PeteH. It turned out to be a route, that other people can follow. – andy256 Oct 19 '14 at 20:30
4

Ok, Looking at the data you posted, you can see

<rte>

...

</rte>

These tags enclose the whole GPX Route.

After the tag comes the name. You can put what you like in between the second [ and the ]]:

<name><![CDATA[End to End - Day 1 -  Lands Ends to St Just]]></name>

Then comes an ordered set of routepoints

<rtept lat="50.066113" lon="-5.712081">
  <name>1</name>
</rtept>

You can construct a file starting with the first three lines

<?xml version="1.0" encoding="UTF-8"?>

<gpx xmlns="http://www.topografix.com/GPX/1/0" ...

<rte>

Then add in all the routepoints from your various GPX files.

End with

</rte>

</gpx>

Hope that helps.

  • I will need to experiment; should be interesting as some routes have vast numbers of waypoints. – Alan Farthing Oct 20 '14 at 9:33
2

Looking at the dropbox file it appears to contain a route, rather than a track. I suspect something went wrong when you exported the file. If there are options on what to export, then you want to export the track rather than the route or waypoints or anything else.

This Wikipedia article on GPX has more details on GPX files which might help..

  • When I use the button "Export to GPX" I am only given the option to save file; can't select track or route. – Alan Farthing Oct 20 '14 at 9:33
0

I don't think I will be able to do what I really want.

My idea is to have an A3 print, or even an A2 print, of our whole route from Lands End to John O Groats, overlaid over a map of the UK.

I now have a gpx of the whole route

However the only place I can get a reasonable representation is on my tablet or phone.

This has to do with esthetics not information.

These two images, one a screenshot from my tablet and the other a screenshot from Google Earth show the esthetic differences:-

https://www.dropbox.com/s/hngvvcru7ar3jtk/Screenshot_2014-10-24-10-23-25.jpg?dl=0

https://www.dropbox.com/s/1rwy92svwwkjtyx/Google%20Earth.jpg?dl=0

The tablet screenshot would look ok, in a larger size (if I could scale the map detail as well i.e enlarging this just shows towns etc as blurs); the blue overlay gives enough detail without being over bearing. The line Google Earth shot is just too thick.

  • What do you want the big printout for? a poster or something? – Ifor Oct 24 '14 at 15:45
0

Each member of our "End-to_end" ride would like an image to hang on their study wall; bearing in mind our, now, ages, some are not that au-fait with computers and prefer the technology in use when we did the ride i.e. 1998, even if I had to use the latest to produce the image. A2 ideally but A3 would do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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