https://github.com/keyan/route_planner
Road network routing engine
https://github.com/keyan/route_planner
algorithms graph-theory osm routing-engine
Last synced: 10 months ago
JSON representation
Road network routing engine
- Host: GitHub
- URL: https://github.com/keyan/route_planner
- Owner: keyan
- License: mit
- Created: 2018-09-28T15:24:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-30T18:20:30.000Z (over 5 years ago)
- Last Synced: 2025-03-19T03:05:54.687Z (10 months ago)
- Topics: algorithms, graph-theory, osm, routing-engine
- Language: C++
- Homepage: http://demo.keyanp.com/route_planner
- Size: 222 KB
- Stars: 4
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# route_planner
A road network routing engine modeled after [OSRM](https://github.com/Project-OSRM/osrm-backend) and built using educational resources provided by Dr. Hannah Bast in her course [Efficient Route Planning](http://ad-wiki.informatik.uni-freiburg.de/teaching/EfficientRoutePlanningSS2012).
Purely an academic exercise, not intended for production usage.
## Overview
A road network router using [OpenStreetMap](https://www.openstreetmap.org/) data. Currently the demo server uses A\* routing with landmark heuristics.

Future improvements:
1. Replace A\* usage with contraction hierarchies
1. Improved webserver and error handling for clients, currently not clear when attempting to route outside of the configured network
1. Investigate techniques for handling larger regions, currently OSM XML parsing and connected component computations are very slow for large graphs
## Usage
### Demo
A live demo using vector tiles provided by [MapBox](https://www.mapbox.com/) and configured with a small graph containing a region within Seattle WA is available at: http://demo.keyanp.com/route_planner
You can make direct requests to the demo routing server as well:
```
$ curl http://demo.keyanp.com/route?47.619872,-122.347477,47.598289,-122.334700
```
### Build from source
You will need a C++11 compatible compiler (`g++`) and `make`.
Install dependencies (Debian):
```
$ apt-get update && apt-get install -y g++ make
```
Install dependencies (MacOSX):
```
$ brew install make
# Follow prompts to install Xcode developer tools
$ g++
```
Download boost:
```
$ make install
```
Build and run benchmarks:
```
$ make install build && ./main
```
### Local server
Build and run in server mode:
```
$ make build && ./main [port]
```
### Development
Run tests with:
```
$ make test
```
A Debian VM is provided to allow for use of `gdb` and `valgrind` without running into issues with MacOSX:
```
# Run Debian VM and login
$ vagrant up && vagrant ssh
# Keep local dir in sync with VM (run from host machine)
$ vagrant rsync-auto
```