An open API service indexing awesome lists of open source software.

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

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.

![Screenshot of web frontend](https://user-images.githubusercontent.com/6401746/47963067-59aad580-dfdb-11e8-9671-66e68811afb9.png)

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
```