https://github.com/openplannerteam/routable-tiles
An API and preprocessor to serve routable tiles.
https://github.com/openplannerteam/routable-tiles
itinero open-data openstreetmap routing-engine
Last synced: 10 days ago
JSON representation
An API and preprocessor to serve routable tiles.
- Host: GitHub
- URL: https://github.com/openplannerteam/routable-tiles
- Owner: openplannerteam
- Created: 2017-09-04T14:50:53.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-03-29T11:00:39.000Z (about 2 years ago)
- Last Synced: 2025-03-30T19:22:48.599Z (about 1 month ago)
- Topics: itinero, open-data, openstreetmap, routing-engine
- Language: C#
- Homepage: https://openplanner.team/
- Size: 6.75 MB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# routable-tiles
[](https://github.com/openplannerteam/routable-tiles/actions/workflows/production.yml)
A CLI tool to generate routable tiles. The main goal of this tool is to generate ready to use 'routable tiles' that can be consumed by existing routeplanning apps.This is an example for the city of Ghent:

Or the Benelux:

## Generating tiles
First filter out all non-routing data using osmosis:
`osmosis --read-pbf brussels-latest.osm.pbf --lp --tf accept-ways highway=* route=* --tf accept-relations type=route,restriction --used-node --lp --write-pbf brussels-routing.osm.pbf`
On a planet scale you can do this in three steps if it fails:
1. Extract ways: `osmosis --read-pbf planet-latest.osm.pbf --lp --tf accept-ways highway=* route=* --lp --write-pbf planet-1-highways.osm.pbf`
2. Only keep used nodes: `osmosis --read-pbf planet-1-highways.osm.pbf --lp --used-node --lp --write-pbf planet-1-used-nodes.osm.pbf`
3. Only keep routing related relations: `osmosis --read-pbf planet-1-used-nodes.osm.pbf --tf accept-relations type=route,restriction --lp --write-pbf planet-routing.osm.pbf`REMARK: this can probably be optimized by tuning osmosis or using another tool to extract the routing data.
Second step is to convert the planet file into a tiled OSM database. This 'database' is just a collection of files on disk containing the OSM data per tile.
## Deployment
This is via docker, start the container like this, with `/path/to/db` the path to the database create by the CLI project:
`docker run -d -v /path/to/db:/var/app/db/ -v /path/to/logs/:/var/app/logs/ -p 5000:5000 --name routeable-tiles-api openplannerteam/routeable-tiles-api`