gpxsplitter splits multi-track GPX files, containing waypoints, into individual one-track GPX files with their respective waypoints.

GPX files containing multiple tracks and waypoints jumbled together are produced on export by many GPS units, particularly MTK chipset-based devices such as the Qstarz Q1000 and Transystem i-Blue 474. Separating tracks and their associated waypoints was a headache until gpxsplitter came along.

Each file will be output and named according to the last timestamp of the track. The last modified time will also be set on the file to make organizing tracks on a filesystem level that much easier.

gpxsplitter depends on the Python 2.6 (or above in the 2.x series) and the modules:

On Debian/Ubuntu, you can install the required dependencies with:

sudo aptitude install python-datetime python-lxml python-egenix-mxdatetime

Download directly (this link will always download the latest version), or browse the gpxsplitter repository on Github.



v0.2 – 15 Feb 2011

v0.1 – 28 Jan 2011

Other programs

I found a few pre-existing programs that perform the same, or similar function:

Neither preserve waypoints, a discerning GpxSplitter feature. As you can see in Benchmarks, GpxSplitter is significantly faster.


Very informal testing:









Known issues

GpxSplitter is designed to split files with waypoints. It does this by determining the start and end times of the track, and finding all waypoints that occurred within that period. If a track does not have timestamps, then it's not (reliably) possible to correlate waypoints. To that effect, GpxSplitter doesn't handle tracks without timestamps very well… there are several bugs here to fix.

Future plans

Port to Python 3.

Make lxml dependency optional, so GpxSplitter can run with Python's built-in ElementTree only. For better portability.

Complete integration testing (e.g. testing against test GPX files).

Add support for working w/ GPX files w/out timestamps (waypoint association will not work).

Rename files w/ base filename prepended to output filenames.


Thanks for the following people who have helped test and develop GpxSplitter:

SamatsWiki: GpxSplitter (last edited 2015-03-20 00:10:38 by SamatJain)