https://github.com/stunkymonkey/osm_ch
contraction hierarchies
https://github.com/stunkymonkey/osm_ch
contraction-hierarchies dijkstra-shortest-path openstreetmap
Last synced: 6 months ago
JSON representation
contraction hierarchies
- Host: GitHub
- URL: https://github.com/stunkymonkey/osm_ch
- Owner: Stunkymonkey
- License: mit
- Created: 2019-10-14T12:10:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-05T20:37:56.000Z (over 1 year ago)
- Last Synced: 2024-04-05T21:34:23.420Z (over 1 year ago)
- Topics: contraction-hierarchies, dijkstra-shortest-path, openstreetmap
- Language: Rust
- Homepage:
- Size: 1.53 MB
- Stars: 15
- Watchers: 4
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# OSM-Contraction-Hierarchies
by Felix Bühler
This project was part of "Lab Course: Algorithms for OSM Data".
This project implements "Contraction Hierarchies". Which is one of the best known speed-up techniques for shortest path calculations. As data source [OpenStreetMap](https://www.openstreetmap.org)-data is used.

This repository consists of two programms:
## pre
This will parse the `*.osm.pbf` file into a `*.osm.pbf.fmi` file, which is needed for the `web`-program
Cropped OSM-data can be downloaded from [Geofabrik.de](https://download.geofabrik.de/index.html)
### dependecies
- `bincode` = exporting serialization
- `num_cpus` = get number of threads
- `osmpbfreader` = parsing the pbf file
- `rayon` = parallelization
- `serde` = serialization
### Compilation
`cargo build --release -p osm_ch_pre`
### Usage
`cargo run --release -p osm_ch_pre ./germany-latest.osm.pbf`
### Info
from different grahps the best performance was using two cores (`taskset -c 0,1 cargo run ...`). This may vary between grahps.
## web
is the webserver which provides the web-interface. (it needs the `*.osm.pbf.fmi`-file from the `pre`-programm.)
### dependecies
- `actix-files` = serving static files
- `actix-rt` = running actix
- `actix-web` = webserver
- `bincode` = exporting serialization
- `env_logger` = logging the webserver
- `rayon` = parallelization
- `serde` = serialization
- `serde_json` = serialization json
### Compilation
`cargo build --release -p osm_ch_web`
### Usage
`cargo run --release -p osm_ch_web ./germany-latest.osm.pbf.`