Skip to main content

GPS Tools - A collection of tools to work with GPS track files.

Project description

GPS Tools

CI Coverage Status PyPI - Version

Python 3.12+

GPS Tools - A collection of tools to work with GPS track files.

Example Usage

convert .fit file to .gpx file

gpst process track.fit -o track.gpx

Detailed Usage

$ gpst -h
usage: gpst [-h] [--version] tool ...

GPS Tools - A collection of tools to work with GPS track files.

positional arguments:
  tool        Available tools:
    map       Draw map of input file.
    plot      Plot data from the fit file.
    process   Process GPS track file and write results to a GPX file.

options:
  -h, --help  show this help message and exit
  --version   show program's version number and exit

gpst process

$ gpst process -h
usage: gpst process [-h] -o OUT_FILE [-y] [--fix-elevation DEM_FILE [DEM_FILE ...]] [--dem-crs DEM_CRS] [--elevation-smoothing-window METERS] [--grade-calculation-window METERS] IN_FILE

positional arguments:
  IN_FILE               Path to input file (.gpx or .fit).

options:
  -h, --help            show this help message and exit
  -o, --output OUT_FILE
                        Path to the output file.
  -y, --yes             Accept questions (e.g. overwrite existing output file).
  --fix-elevation DEM_FILE [DEM_FILE ...]
                        Correct elevation data using DEM files.
  --dem-crs DEM_CRS     Coordinate reference system of the DEM files to be used if no CRS is specified in the files themselves (e.g. 'EPSG:4326').
  --elevation-smoothing-window METERS
                        Smoothing window for elevation data in meters (default: 100).
  --grade-calculation-window METERS
                        Window size for grade calculation in meters (default: 100).

Example DEM coordinate reference systems:

  • PL-KRON86-NH -> 'EPSG:2180'
  • PL-EVRF2007-NH -> 'EPSG:9651'

When --fix-elevation is in use, tool produces report in form of csv file and png plot, e.g.:

$ gpst process track.fit -o ./track.gpx -y --fix-elevation ./dem/*.asc --dem-crs EPSG:2180

Elevation Fix

Elevation Plot without and with --fix-elevation

No fix

Plot

With fix

Plot

gpst plot

Note: plot tool does not calculate additional fields, to use calculated fields with FIT file, convert with process tool to GPX first

$ gpst plot -h
usage: gpst plot [-h] -x X_AXIS -y Y_AXIS [Y_AXIS ...] [--y-right Y_AXIS_RIGHT [Y_AXIS_RIGHT ...]] [-t {line,scatter}] [--type-right {line,scatter}] [--width WIDTH] [--height HEIGHT] [-o OUTPUT] FILE

positional arguments:
  FILE                  Path to input file (.gpx or .fit).

options:
  -h, --help            show this help message and exit
  -x, --x-axis X_AXIS   Field to use for the x-axis.
  -y, --y-axis Y_AXIS [Y_AXIS ...]
                        Field to use for the y-axis.
  --y-right Y_AXIS_RIGHT [Y_AXIS_RIGHT ...]
                        Field to use for the y-axis on the right side.
  -t, --type {line,scatter}
                        Plot type: line, scatter. Default is line.
  --type-right {line,scatter}
                        Plot type for right y-axis: line, scatter. Default is line.
  --width WIDTH         Width of the output image in pixels (default: 2048).
  --height HEIGHT       Height of the output image in pixels (default: 1024).
  -o, --output OUTPUT   Path to the output image file. If not provided, shows the plot interactively.

Example:

$ gpst plot ./track.gpx --x-axis distance --y-axis grade --y-right elevation smooth_elevation -o plot.png --width 1024 --height 512

Plot

gpst map

Note: map tool does not calculate additional fields, to use calculated fields with FIT file, convert with process tool to GPX first

$ gpst map -h
usage: gpst map [-h] [--dem DEM_FILE [DEM_FILE ...]] [--dem-crs DEM_CRS] [--width WIDTH] [--height HEIGHT] [--line-width LINE_WIDTH] [-o OUTPUT] [--show-title] [--trim {tight,box}]
                FILE

positional arguments:
  FILE                  Path to input file (.gpx or .fit).

options:
  -h, --help            show this help message and exit
  --dem DEM_FILE [DEM_FILE ...]
                        DEM files to use as background elevation data.
  --dem-crs DEM_CRS     Coordinate reference system of the DEM files to be used if no CRS is specified in the files themselves (e.g. 'EPSG:4326').
  --width WIDTH         Width of the output image in pixels (default: 4096).
  --height HEIGHT       Height of the output image in pixels (default: 4096).
  --line-width LINE_WIDTH
                        Width of the track line (default: 2.5).
  -o, --output OUTPUT   Path to the output image file. If not provided, shows the map interactively.
  --show-title          Show the activity name as the title of the map.
  --trim {tight,box}    Trim the map to the track bounds.

Example:

$ gpst map ./track.gpx --dem ./dem/*.asc --dem-crs EPSG:2180 -o map.png --width 1024 --height 1024 --trim box --line-width 1

Map

Limitations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpst-0.6.1.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpst-0.6.1-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file gpst-0.6.1.tar.gz.

File metadata

  • Download URL: gpst-0.6.1.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gpst-0.6.1.tar.gz
Algorithm Hash digest
SHA256 11310ae67c0467099227795b15f6f711b424e4abb393d7a1d4c47a0f96ce3b18
MD5 903061288071df7e823214b125bf5619
BLAKE2b-256 369ccac40389438456fc651e8046afae86f1c26b978df84e087061c97e5fabc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpst-0.6.1.tar.gz:

Publisher: ci.yml on neri14/gpst

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gpst-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: gpst-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 41.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gpst-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 938335d2e36254795ff5476fc33ff1387c74fc374e2390d21f51f323daa504b4
MD5 c94152d2eb811df456b59acc86f92884
BLAKE2b-256 6dbc970236b06fd25a06083ecb729a2e7a489d421e457612ca5df1a5061b8296

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpst-0.6.1-py3-none-any.whl:

Publisher: ci.yml on neri14/gpst

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page