Can track or route be determined from .gpx file?

Got a question that doesn't fit in to any other category? Then please use this section.
Post Reply
User avatar
Peobody
Subscriber
Posts: 1565
Joined: Tue Apr 20, 2021 1:33 pm
Location: North Carolina USA
Has liked: 117 times
Been liked: 348 times
United States of America

Can track or route be determined from .gpx file?

Post by Peobody »

I have a number of .gpx files that I have received from fellows riders. I transferred two of them to my XT via the Drive app and discovered that one of them is a track. I looked at the two .gpx files with Notepad and see a difference in the metadata but not a quick easy way to identify one from the other. Does anyone know if there is a certain search term that would do it?
2008 Honda GL1800 Goldwing
1995 Kawasaki ZG1000 Concours
zūmo XT linked to Cardo Packtalk Bold and iPhone SE.
jfheath
Posts: 2807
Joined: Sat Oct 19, 2019 4:17 pm
Location: West Yorkshire, Uk
Has liked: 369 times
Been liked: 780 times
Great Britain

Re: Can track or route be determined from .gpx file?

Post by jfheath »

A large number of tracks, routes and / or waypoints can be defined in the same gpx file.

They are each defined by a start and end 'tag' (eg <trk>, <rte>, <wpt>) and end with a similar tag eg (</trk>, </rte>, </wpt>)

However, since the 3 tag can be followd by other information inside the < >, then you can search for just the first 4 characters.

<trk
<rte
<wpt

Anything between the <trk> and the </trk> tags are all to do with the same track (similarly for routes and waypoints) - and lines will contain other 'tags' - eg <trkpt>, <rtept>

But the start of each track, route or waypoint - ie the first few lines - will let you know what the track, route or waypoint is called.

More info if you want it here
https://www.topografix.com/GPX/1/1/

But be warned that the gpx file format standrads allow each developer to include their own definitions - or extensions - to the standard format.
Have owned Zumo 550, 660 == Now have Zumo XT2, XT, 595, 590, Headache
Use Basecamp (mainly), MyRouteApp (sometimes), Competent with Tread for XT2, Can use Explore for XT - but it offers nothing that I want !

Links: Zumo 590/5 & BC . . . Zumo XT & BC
User avatar
Peobody
Subscriber
Posts: 1565
Joined: Tue Apr 20, 2021 1:33 pm
Location: North Carolina USA
Has liked: 117 times
Been liked: 348 times
United States of America

Re: Can track or route be determined from .gpx file?

Post by Peobody »

Thank you!
2008 Honda GL1800 Goldwing
1995 Kawasaki ZG1000 Concours
zūmo XT linked to Cardo Packtalk Bold and iPhone SE.
Post Reply