Skip to main content

generate location metatata like peaks, huts for a given gpx file

Project description

waykit

waykit is a python tool to generate location metatata like peaks, huts and other pois for a given gpx file

Usage

You can run the tool directly from github with uvx

uvx git+https://github.com/hoffmann/waykit -o output.geojson input.gpx

To install and run the package from pypi:

# use your preferred tool to create a virtual environment
pip install waykit
waykit -o output.geojson input.gpx 

You can also clone the repository and run it locally

uv run waykit -o output.geojson input.gpx 

Providers

waykit ships with two data providers that can be selected via the --provider flag.

openstreetmap (default)

Queries the Overpass API at runtime to fetch peaks and alpine huts within a bounding box around the GPX track. This always returns up-to-date data but requires an internet connection and is subject to Overpass rate limits.

waykit -o output.geojson input.gpx
waykit --provider openstreetmap -o output.geojson input.gpx

cached

Uses a bundled, gzipped JSONL export of OpenStreetMap data. The data is loaded into a square-grid spatial index on first use, so lookups are fast and fully offline. This is useful for repeatable results, CI pipelines, or environments without network access.

waykit --provider cached -o output.geojson input.gpx

The cached dataset currently covers alpine huts in the Alps. It will be expanded over time to include peaks and other POI types.

Spatial indexing

waykit includes a custom square-grid spatial index rather than using an established system like H3, S2, or Geohash. This is intentional.

The grid index is a simple equirectangular projection divided into fixed-size meter cells. The entire implementation is pure Python with no external dependencies, making it straightforward to understand, debug, and extend.

A key goal is cross-language portability. The same algorithm and cell ID encoding can be reimplemented in JavaScript (or any other language) without pulling in a native binding or a large library. This keeps both the Python package and a future browser/Node.js version lightweight and dependency-free.

For the scale waykit operates at (regional hiking areas like the Alps), the equirectangular approximation is more than accurate enough. A full spherical grid system would add complexity without meaningful benefit.

Run the tests

If you have just installed you can use the following

just test

otherwise check the command in the justfile to run the pytests

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

waykit-0.2.0.tar.gz (844.2 kB view details)

Uploaded Source

Built Distribution

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

waykit-0.2.0-py3-none-any.whl (844.9 kB view details)

Uploaded Python 3

File details

Details for the file waykit-0.2.0.tar.gz.

File metadata

  • Download URL: waykit-0.2.0.tar.gz
  • Upload date:
  • Size: 844.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for waykit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5ff1acd11428cb15feb3d6449ab591c85900347e88a4e4e0802652abbc9a36d6
MD5 3b2c7b9f36b17ccc748626079849310e
BLAKE2b-256 67745308c732cd161b2aa23c76d9badf94d5783a783d46d59eb3c393e45e8ab6

See more details on using hashes here.

File details

Details for the file waykit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: waykit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 844.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for waykit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 550b50b6974e2cbd88632e1c7a5559ba0d18fa383dd30b5824e4a9664c194a9f
MD5 8d451123b888e31f949d3de2bdfff552
BLAKE2b-256 575c00ba548813f84a887aa336ae60b6e1fbb22e90294ed17bbb8a229fc7a222

See more details on using hashes here.

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