Awesome
Openrouteservice
Openrouteservice is a highly customizable, performant routing service written in Java. It uses a forked and edited version of graphhopper 4.0 and provides global spatial services by consuming user-generated and collaboratively collected free geographic data directly from OpenStreetMap:
- Directions Service: Get directions for different modes of transport
- Isochrones Service: Obtain areas of reachability from given locations
- Matrix Service: Obtain one-to-many, many-to-one and many-to-many matrices for time and distance
- Snapping Service: Snap coordinates to the road network
- Export Service¹: Export the base graph for different modes of transport
- Health Endpoint¹: Get information on the health of the running openrouteservice instance
- Status Endpoint¹: Get information on the status of the openrouteservice instance
¹) Export, Health and Status Endpoint are not available in our public openrouteservice API aka "live API"! You can use them by running your own instance of openrouteservice.
And to avoid any misunderstandings, it should also be mentioned at this point that our live API provides several other endpoints that are not part of the openrouteservice software/repository:
- openpoiservice: A stand-alone service from HeiGIT that returns points of interest in the area surrounding a geometry
- openelevationservice: A stand-alone service from HeiGIT that returns the elevation for point or line geometries
- Pelias: A (reverse) geocoder hosted by HeiGIT that resolves geographic coordinates to addresses and vice versa
- VROOM: The Vehicle Routing Open-source Optimization Machine hosted by HeiGIT
To play around with openrouteservice you may use our demonstration server which comes with both the backend and a frontend. Or simply sign up for an API key and fire your requests against the API directly. You can also do this in our API Playground - take a look at the API Reference to get more information.
Installation
You can easily run openrouteservice yourself!
tl;dr: We suggest using docker to install and launch openrouteservice. In short, a machine with a working docker installation will get everything done for you.
Change to the directory where you want to install your local openrouteservice and first create some directories, where openrouteservice will persist its data:
mkdir -p ors-docker/config ors-docker/elevation_cache ors-docker/graphs ors-docker/files ors-docker/logs
Only use nightly (main branch) if you know what you do. We recommend running docker compose with the latest release version. Get the docker compose file for a release, e.g. v8.0.0:
wget https://github.com/GIScience/openrouteservice/releases/download/v8.0.0/docker-compose.yml
Start openrouteservice in the background:
docker compose up -d
This will pull the openrouteservice docker image of the selected version and start it up using an example setup and the provided test OSM file for Heidelberg/Germany and surrounding area.
To see the container's logs, run:
docker compose logs
Stop the container with:
docker compose down
Usage
The above mentioned endpoints will be available on port 8080:
http://localhost:8080/ors/v2/directions
http://localhost:8080/ors/v2/isochrones
http://localhost:8080/ors/v2/matrix
http://localhost:8080/ors/v2/snap
http://localhost:8080/ors/v2/export
http://localhost:8080/ors/v2/health
http://localhost:8080/ors/v2/status
You can find more information in the endpoint documentation pages linked above.
On the API Reference there is also a description how you can use the Swagger-UI and the API Playground for local instances of openrouteservice.
Changelog/latest changes
Contribute
We appreciate any kind of contribution - bug reports, new feature suggestion or improving our translations are greatly appreciated. Feel free to create an issue and label it accordingly. If your issue regards the openrouteservice web-app please use the corresponding repository.
If you want to contribute your improvements, please follow the steps outlined in our CONTRIBUTION guidelines
The sourcespy dashboard provides a high level overview of the repository including technology summary, module dependencies and other components of the system.
Questions
For questions please use our community forum.
Translations
If you notice anything wrong with translations, or you want to add a new language to the ORS instructions, we have some instructions in our backend documentation about how you can submit an update. You can also look over at our maps client GitHub if you want to contribute the language to there as well (adding or editing the language in the openrouteservice GitHub repo only affects the instructions - any new language also needs adding to the client).