Narzędzia osobiste
Start Blog gpxtools - command line tools useful to manipulate GPX files

Przejdź na skróty do treści. | Przejdź do nawigacji

gpxtools - command line tools useful to manipulate GPX files

by Wojciech Lichota — last modified Jul 06, 2009 11:45 PM
Filed Under:

Information about first release of gpxtools - command line tools useful to manipulate GPX files.

One of my hobby is cycling. There are few website that collects informations about trips and than can show statistics. My favorite is BikeBrother.

Some of my rides I record with GPS device (RBT-2100) connected via bluetooth to my phone (SE P1i). Tracks are stored in GPX files. But this data aren't perfect. For example - elevation (position in meters above sea level) sometimes has very strange value (probably because low quality of GPS device or some distortion of signal).

To fix such low quality data in GPX file I made few command-line tools:

gpx-elevation-fix
Fixes elevation (Z-axis) data in GPX file based on SRTM data.
gpx-cleanup
Removes from GPX file unnecessary data (e.g.: speed or course) stored by some GPS devices.
gpx-compress
Removes unnecessary chars (e.g.: white spaces) to decrease GPX file size.

Scripts are of course written in python. More information can be found on PyPI.

Tools can be easily used in pipeline:

cat input.gpx  | ./bin/gpx-fix-elevation | ./bin/gpx-cleanup | ./bin/gpx-compress > output.gpx

Correct value of elevation is calculated based on data from Shuttle Radar Topography Mission (SRTM). Very useful was eleserver by grahamjones139 - SRTM calculation code is based on this project.

gpx-cleanup and gpx-compress commands should decrease GPX file size - shorter upload time.

In plans I have next tools:

  • join and split GPS tracks,
  • strip track (remove points on start and end of track that are almost in the same place),
  • smooth track (recognize and remove accidental position jumps),

but I must find some time for small research ;)

Powered by DISQUS comment system