Here’s my config:
ors:
engine:
profile_default:
build:
source_file: example.osm.pbf
profiles:
#driving-car:
# enabled: true
cycling-regular:
enabled: true
build:
encoder_options:
enable_custom_models: true
foot-walking:
enabled: true
build:
encoder_options:
enable_custom_models: true
Here’s the query:
resp = session.post(
f"{BASE_PATH}directions/cycling-regular/geojson",
json={
"coordinates": [xxx, xxx],
"instructions": False,
"elevation": True,
"extra_info": ["steepness", "suitability", "surface", "waycategory", "waytype"],
"custom_model": {
"speed": [
{
"if": True,
"limit_to": 1
}
],
}
}
)
print(resp.json()["features"][0]["properties"]["summary"])
I don’t get any error when running the query, but the result is the same whatever the limit value, and the same if I just remove the custom_model parameter.
{‘distance’: 4904.4, ‘duration’: 1076.5}
Any idea why the speed limit doesn’t work?
(I’m doing this as a first step to check the custom_model feature. I figured setting a low limit would make it obvious whether or not the server is correctly configured.)