Size: 1562
Comment: Flesh out page
|
Size: 3397
Comment: Switch to Github
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
GPX files containing multiple tracks and waypoints jumbled together are produced by many GPS units, in particular MTK chipset-based devices such as the Qstarz Q1000 and Transystem i-Blue 474 devices. Separating tracks and their associated waypoints was a headache until gpxsplitter came along. | 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. |
Line 5: | Line 5: |
gpxsplitter depends on the Python 2.6 and above and the modules: | 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. |
Line 7: | Line 7: |
gpxsplitter depends on the Python 2.6 (or above in the 2.x series) and the modules: * datetime |
|
Line 12: | Line 15: |
{{{#!highlight sh sudo aptitude install python-lxml python-egenix-mxdatetime |
{{{ sudo aptitude install python-datetime python-lxml python-egenix-mxdatetime |
Line 16: | Line 19: |
[[FrontPage|Download gpxsplitter.py directly]], or browse the [[FrontPage|gpxsplitter repository on Gitorious]]. | [[https://raw.githubusercontent.com/samatjain/gpxsplitter/master/gpxsplitter.py|Download gpxsplitter.py directly]] (this link will always download the latest version), or [[https://github.com/samatjain/gpxsplitter|browse the gpxsplitter repository]] on Github. |
Line 20: | Line 23: |
v0.1 — 04 Jan 2010 — First release. | === Unreleased === * Add integration tests (i.e. test against known GPX files) using cram. If you've a test you'd like to contribute, please do! * Switch from egenix-mxdatetime to dateutil for Python 3 compatibility. * Actually work with GPX 1.0 and 1.1 (this was broken in v0.2). === v0.2 – 15 Feb 2011 === * Bug fixes. * Works with both GPX 1.0 and 1.1, tracks without timestamps. Thanks malenki! === v0.1 – 28 Jan 2011 === * First release (not really public) == Other programs == I found a few pre-existing programs that perform the same, or similar function: * [[http://b42.cz/gpxsplit/|gpxsplit]] is a Haskell/Haxml-based GPX file splitter. On Ubuntu, required some 360 MB of dependencies (Haskell compilers, libraries, etc). * [[http://shallowsky.com/software/mapping/|gpxmgr]] is a Python/minidom-based GPX file splitter. Python's minidom is known for being notoriously slow. Neither preserve waypoints, a discerning GpxSplitter feature. As you can see in Benchmarks, GpxSplitter is significantly faster. |
Line 31: | Line 56: |
== Other programs == | == Known issues == |
Line 33: | Line 58: |
I found a few pre-existing programs that perform the same, or similar function: | 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. |
Line 35: | Line 60: |
* [[http://b42.cz/gpxsplit/|gpxsplit]] is a Haskell/Haxml-based GPX file splitter. On Ubuntu, required some 360 MB of dependencies (Haskell compilers, libraries, etc). * [[http://shallowsky.com/software/mapping/|gpxmgr]] is a Python/minidom-based GPX file splitter. Python's minidom is known for being notoriously slow. |
== Future plans == |
Line 38: | Line 62: |
As you can see in Benchmarks, gpxsplitter is significantly faster, and requires fewer dependencies. | 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 == Thanks for the following people who have helped test and develop GpxSplitter: * [[http://www.openstreetmap.org/user/malenki|malenki]] |
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:
- datetime
- lxml
- mxDateTime
On Debian/Ubuntu, you can install the required dependencies with:
sudo aptitude install python-datetime python-lxml python-egenix-mxdatetime
Download gpxsplitter.py directly (this link will always download the latest version), or browse the gpxsplitter repository on Github.
Changelog
Unreleased
- Add integration tests (i.e. test against known GPX files) using cram. If you've a test you'd like to contribute, please do!
- Switch from egenix-mxdatetime to dateutil for Python 3 compatibility.
- Actually work with GPX 1.0 and 1.1 (this was broken in v0.2).
v0.2 – 15 Feb 2011
- Bug fixes.
- Works with both GPX 1.0 and 1.1, tracks without timestamps. Thanks malenki!
v0.1 – 28 Jan 2011
- First release (not really public)
Other programs
I found a few pre-existing programs that perform the same, or similar function:
gpxsplit is a Haskell/Haxml-based GPX file splitter. On Ubuntu, required some 360 MB of dependencies (Haskell compilers, libraries, etc).
gpxmgr is a Python/minidom-based GPX file splitter. Python's minidom is known for being notoriously slow.
Neither preserve waypoints, a discerning GpxSplitter feature. As you can see in Benchmarks, GpxSplitter is significantly faster.
Benchmarks
Very informal testing:
Program |
Time |
gpxsplit |
24s |
gpxmgr |
32s |
gpxsplitter |
1s |
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
Thanks for the following people who have helped test and develop GpxSplitter: