Hello,
I’m trying to build a local GraphHopper server for a shared bicycle service, and i’m encountering a issue.
My goal is to set up a server that supports both bicycle and foot routing, as well as the round_trip feature from the Directions API.
The server ran successfully before i tried to enable elevation data in my config.yml. However, since adding the elevation settings, I’m getting an error that variables like average_slope are not available.
I have already tried deleting the graph-cache folder and rebuilding the graph multiple times, but the issue remains.
Could you please help me understand what i might be missing in my configuration?
Here is my config.yml:
graphhopper:
datareader.file: south-korea-latest.osm.pbf
graph.location: "graph-cache"
vehicles:
- bike
- foot
profiles:
- name: bike
vehicle: bike
weighting: custom
custom_model:
priority:
- {if: "bike_network == LOCAL", multiply_by: 2}
- {if: "bike_network == MISSING", multiply_by: 0.8}
- {if: "road_class == STEPS", multiply_by: 0}
speed:
- {if: "average_slope >= 10", limit_to: 5}
- {if: "average_slope >= 5", limit_to: 10}
- {if: "average_slope <= -5", multiply_by: 1.2}
- {if: "bike_network == LOCAL", limit_to: 20}
profiles_ch:
- profile: bike
- profile: foot
import.osm.ignored_highways: ""
elevation:
provider: srtm
cache_dir: ./srtm-cache
server:
application_connectors:
- type: http
port: 8989
bind_host: 0.0.0.0
admin_connectors:
- type: http
port: 8990
bind_host: 0.0.0.0