2.1 KiB
2.1 KiB
OpenRouteService (ORS) Setup Guide
Huidige status
- Locatie:
192.168.1.71:9080(Docker container) - Versie: 8.0.0 (build 2024-03-21)
- Actief profiel:
driving-car✅ - Niet actief:
cycling-regular,cycling-electric,foot-walking,driving-hgv,wheelchair❌
Cycling profiel activeren
Stap 1: SSH naar host
ssh 192.168.1.71
Stap 2: ORS config aanpassen
Locatie: /path/to/ors/config/ors-config.yml (pas aan naar jouw setup)
Voeg toe onder ors.engine.profiles:
ors:
engine:
profiles:
driving-car:
enabled: true
cycling-regular:
enabled: true
graph_path: /home/ors/graphs/cycling-regular
cycling-electric:
enabled: true
graph_path: /home/ors/graphs/cycling-electric
Stap 3: Graph data downloaden
ORS heeft pre-built graphs nodig of moet ze bouwen van OSM data:
# Download Netherlands OSM extract
wget https://download.geofabrik.de/europe/netherlands-latest.osm.pbf
# Bouw graph (kan uren duren)
docker exec -it ors-container java -jar ors-engine.jar build
Stap 4: Container herstarten
docker restart ors-container
Stap 5: Verifiëren
curl -s -X POST "http://192.168.1.71:9080/ors/v2/isochrones/cycling-regular" \
-H "Content-Type: application/json" \
-d '{
"locations": [[5.37055345, 51.50554732]],
"range": [1800]
}' | head -c 200
Verwacht: GeoJSON FeatureCollection (geen error).
Troubleshooting
Error: "getRouteProfile(int) is null"
→ Profiel niet geactiveerd in config of graph ontbreekt.
Error: "Parameter 'X' has incorrect value"
→ Profielnaam bestaat niet (typo of niet ondersteund).
Lange wachttijd na herstart
→ ORS bouwt graphs bij eerste start (kan 30+ min duren voor NL).
API Endpoints
Geocoding (niet beschikbaar op deze instantie)
ORS heeft optionele Pelias geocoding, maar die draait niet op 192.168.1.71. Gebruik PDOK Locatieserver als alternatief.
Isochrones
POST /ors/v2/isochrones/{profile}
Routing
POST /ors/v2/directions/{profile}
Matrix
POST /ors/v2/matrix/{profile}