https://github.com/maciejslawik/route-planner
A profiled route planning library which calculates routes in urban environments for two-wheeled vehicles
https://github.com/maciejslawik/route-planner
navigation pgrouting php postgis postgresql route-planner
Last synced: 5 months ago
JSON representation
A profiled route planning library which calculates routes in urban environments for two-wheeled vehicles
- Host: GitHub
- URL: https://github.com/maciejslawik/route-planner
- Owner: maciejslawik
- License: mit
- Created: 2017-07-23T13:10:49.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-24T20:27:36.000Z (almost 9 years ago)
- Last Synced: 2024-04-20T20:46:24.131Z (about 2 years ago)
- Topics: navigation, pgrouting, php, postgis, postgresql, route-planner
- Language: PHP
- Size: 1.47 MB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/mslwk/route-planner)
[](https://packagist.org/packages/mslwk/route-planner)
[](https://packagist.org/packages/mslwk/route-planner)
# Profiled route planner #
The project finds a route well-suited for the requested type of vehicle in an urban environment.
It uses PostgreSQL with additional extensions.
##### Supported vehicles #####
* motorcycle
* scooter
* bicycle
## System requirements ##
* PostgreSQL 9.6
* PostGIS 2.2
* pgRouting 2.2
* osm2pgrouting 2.0
* osm2pgsql 0.8
* PHP 7.1 with pgsql
## Installation ##
1. Use composer to include the library in your project.
```
composer require mslwk/route-planner
```
2. After cloning the repository download a city extract in .osm file and place it in
``
vendor/mslwk/route-planner/maps/map.osm
``
3. Create configs/config.yml file based on configs/config.example.yml
4. Run deployment/deploy.sh script
## Detailed description ##
The library utilises two PostgreSQL databases to find the best route between two points.
One database is a complete set of information from OSM and is used e.g. to find
streets which with trams. The second one is pgRouting database which represents a city
as a weighted graph and calculates the route.
Nominatim API is used to find the coordinates between the given addresses. The coordinates
are used to find the graph vertices that are closest to the addresses.
The library supports two shortest-path algorithms (Dijkstra/A*).
The route is returned as an array of coordinates.
The data calculated is a json object.
##### Example of a successfully calculated route (from JSON API) #####

##### Example of a failure (from JSON API) #####

## Live examples ##
The examples show a route calculated using the library and displayed using
Google Maps.
#### Motorcycle ####

#### Bicycle ####

#### Scooter ####
