A simple CLI utility to add elevation data to a GPX file using the Open Elevation API.
Download the onefile executable from the releases page, extract, and run.
Alternatively, you can clone the repo to your system, and cd
to it using the CLI
Setup a python virtualenvironment
$ python -m venv venv
Activate the new virtual environment
$ . venv/bin/activate
Install the required python modules
$ pip install -r requirements.txt
Once the environment is setup and ready to go, the program can be run using:
$ python src/main.py
This will result in the help message being displayed:
src/main.py - a utility to add elevation data to a GPX file:
USAGE:
main.py [FLAGS] <gpx_file>
ARGUMENTS:
<gpx_file> Path to target GPX file.
FLAGS:
-o/--output Specify the output GPX file location.
-h/--help Show this message
The usage is straight forward, call the program with the GPX file you want to add elevation data to as an argument, by default the program will calculate the elevation data to a new file with the same path as the original, with a "-elevation" suffix appended.
This behaviour can overridden using the --output
flag, with the desired path to your new GPX file.
Depending on the number of nodes in your GPX file, the calculation of the elevations may take a while. Requests to the open-elevation.com API are batched in sets of 512 nodes, with an interval of 1 second between completed requests, to not overload the API.