Python Forum

Full Version: [GPX] Read all trkpt, and merge into single track?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I need to merge multiple tracks in multiple GPX files that all go in the same direction but aren't in the right order.

Before I figure out how to do it, I was wondering if someone has working code to…
  1. Read multiple GPX files, each containing one or more tracks (<trk>),
  2. Read all the track points they contain (<trkpt>),
  3. Order them, and
  4. Save the whole thing into a single track in a single GPX
?

Thank you.