This repo contains an example on how to configure and user openrouteservice api. This documentation is obtained starting from here please refer to it for additional details. It continas:
- a docker compose file to run the service for Italy
- an example notebook to show how to use the features
In order to start the api we need to:
- download into the
datafolder a valid geofabrik file for the region selected. In our case we use the Italian region.cd data wget https://download.geofabrik.de/europe/italy-latest.osm.pbf - start the container, from the root folder of the project
cd .. docker compose up
The service is configured to load:
- directions: Get directions for different modes of transport
- isochrones: Obtain areas of reachability from given locations
- matrix: Obtain one-to-many, many-to-one and many-to-many matrices for time and distance
- geocode: Resolve input coordinates to addresses and vice versa
- pois: Obtain POIs of an area
The first time the container is ran it requires some time to create the index.
If you want to load only the geocode service and disable, routing, matrix and isochrone services modify
Important
When the PBF file is changed we need to set - BUILD_GRAPHS=True (Forces the container to rebuild the graphs, e.g. when PBF is changed) and than stop the service and set it to False for the next runs. Otherwise, you can just cancel the content in the folder elevation_cache, graphs