Skip to content

Latest commit

 

History

History
147 lines (114 loc) · 3.6 KB

README.md

File metadata and controls

147 lines (114 loc) · 3.6 KB

GPX commandline tools

  • gpxinfo: General information about GPX file(s)
  • gpxclean: Removeparts of GPX files (elevations, times, extensions, etc.)
  • gpxmerge: Merge GPX files
  • gpxsimplify: Simplify GPX files
  • gpxsplitter: Split GPX files by time gaps

gpxinfo

$ gpxinfo -h
usage: gpxinfo [-s] [-m] [-d] [file ...]

Command line utility to extract basic statistics from gpx file(s)

optional arguments:
  -h, --help            show this help message and exit
  -t, --track           Only root track
  -s, --seconds         print times as N seconds, rather than HH:MM:SS
  -m, --miles           print distances and speeds using miles and feet
  -u {M,I,N}, --unit {M,I,N}
                        unit used to print distances and speeds : [M]etric, [I]mperial (miles and feet) or [N]autical miles
  -d, --debug           show detailed logging

Example:

$ gpxinfo test_files/2014-with-wpts.gpx 
File: test_files/2014-with-wpts.gpx
    Waypoints: 2
    Routes: 0
    Length 2D: 4.451km
    Length 3D: 4.607km
    Moving time: 00:30:50
    Stopped time: n/a
    Max speed: 3.35m/s = 12.05km/h
    Avg speed: 2.49m/s = 8.97km/h
    Total uphill: 241.00m
    Total downhill: 258.00m
    Started: 2014-08-22 16:48:52+00:00
    Ended: 2014-08-22 17:19:42+00:00
    Points: 413
    Avg distance between points: 10.78m

    Track #0, Segment #0
        Length 2D: 4.451km
        Length 3D: 4.607km
        Moving time: 00:30:50
        Stopped time: n/a
        Max speed: 3.35m/s = 12.05km/h
        Avg speed: 2.49m/s = 8.97km/h
        Total uphill: 241.00m
        Total downhill: 258.00m
        Started: 2014-08-22 16:48:52+00:00
        Ended: 2014-08-22 17:19:42+00:00
        Points: 413
        Avg distance between points: 10.78m

gpxclean

$ gpxclean -h
usage: gpxclean [-h] [-e] [-t] [-x] [-r] [-tr] [-a] [-w] [-o F]

Clean GPX tracks

optional arguments:
  -h, --help        show this help message and exit
  -e, --extensions  Remove extensions
  -t, --time        Remove time
  -x, --elevations  Remove extensions
  -r, --routes      Remove routes
  -tr, --tracks     Remove tracks
  -a, --author      Remove author data
  -w, --waypoints   Waypoints
  -o F, --output F  Output GPX file

gpxmerge

$ gpxmerge -h
usage: gpxmerge [-h] [-o F] [-t] [gpx [gpx ...]]

Merge GPX files

positional arguments:
  gpx               GPX file

optional arguments:
  -h, --help        show this help message and exit
  -o F, --output F  Output GPX file
  -t, --time        Sort by time

gpxsimplify

$ gpxsimplify -h
usage: gpxsimplify [-h] [-d DISTANCE] gpx

Simplify tracks using the Ramer-Douglas-Peucker algorithm

positional arguments:
  gpx                   GPX file

optional arguments:
  -h, --help            show this help message and exit
  -d DISTANCE, --distance DISTANCE
                        Max distance

gpxsplitter

$ gpxsplitter -h
usage: gpxsplitter [-h] [-d] [-t TIME] [gpx [gpx ...]]

Split GPX file

positional arguments:
  gpx                   GPX file

optional arguments:
  -h, --help            show this help message and exit
  -d, --days            Split multi-day track into single day tracks
  -t TIME, --time TIME  Split by time intervals (for exampe 1m, 2s, 3h)

Installation

pip install gpx-cmd-tools

See also

License

These tools are licensed under the Apache License, Version 2.0