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.
User avatar
Peobody
Subscriber
Posts: 1535
Joined: 20 Apr 2021 13:33
Location: North Carolina USA
Has liked: 113 times
Been liked: 335 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: 2711
Joined: 19 Oct 2019 16:17
Location: West Yorkshire, Uk
Has liked: 351 times
Been liked: 749 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: 1535
Joined: 20 Apr 2021 13:33
Location: North Carolina USA
Has liked: 113 times
Been liked: 335 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.