HTML + leaflet.js GPX track viewer using OpenStreetMap

@lagfra lagfra authored 17 days ago
css side bar with inf 17 days ago
images first 3 years ago
js side bar with inf 17 days ago
python gpx simplify compression script 22 days ago
tracks first 3 years ago
README.md readme 19 days ago
index.html side bar with inf 17 days ago
README.md

GPX toolset

GPX web viewer

  • Extremely simple GPX track viewer, meant to be embedded in article webpages. Using leaflet and OpenStreetMap tiles, with fancy tooltips displaying track details and clickable tracks to download.

GPX simplify script

Use python to compress a GPX track using gpxpy and the Ramer–Douglas–Peucker algorithm, optionally removing time. Requires pip3 to install the necessary packages in the virtual environment before running the first time:

cd python/
python3 -m venv .
source ./bin/activate
python3 -m pip install -r requirements.txt

Then run with:

cd python/
./gpxsimplify.py -f <filename> -d <max distance in meters, float> -t <optional: remove time points>

up next:

  1. setup a self-hosted tile server: https://github.com/Overv/openstreetmap-tile-server (resource heavy) or https://github.com/consbio/mbtileserver meant for lightweight hosts
  2. display GPX track metadata
  3. upload GPX tracks through HTML from webpage