Hey there,
My ORS instance appears to work properly except that
avoid_features:[“tollways”]
is ignored and yields the same route as when not using this parameter at all. That route is going through tollways.
I’ve verified the exact same request on the public server and it works fine.
My config file, in its “driving-car” profile contains
preparation.methods.core.lmsets: “highways,tollways;highways;tollways;allow_all”
On another post here I’ve read lmsets is only an optimization and it should be possible to use the Directions API with avoid_features without it.
I’ve merged a few European countries such as FR and CH with osmium (osmium cat file1 file2… -o output.pbf) using files from Geofabrik. The route in question is within France.
It does work with
avoid_features:[“highways”]
even though I don’t actually have a use case for this.
Any idea what’s so special about tollways or my setup?
I’m using the latest from the git repo, latest .osm.pbf files from Geofabrik.
The complete config file can be seen here.
I’ve also tried to build the graph with the following option, but no dice…
“lmsets”: “highways;allow_all”
Hey,
given your latest comment, I assume you’ve read the discussion in this issue.
Note, however, that graphs won’t rebuild on a changed config, but you’ll have to remove the graphs
folder to rebuild.
Could you post the request in question, please?
Hello! I didn’t want to open a new thread as the very same problem is happening to me right now. I am running my own docker instance with a .osm.pbf map from geofabrik and the same route is displayed whether i pass the avoid_features:[“tollways”]
element or not. I am using the profile “driving_hgv” with
"lmsets": "highways;allow_all"
And my request looks like this:
url = "http://localhost:8080/ors/v2/directions/driving-hgv/geojson"
headers = {
'Accept': 'application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8',
#'Authorization': 'key',
'Content-Type': 'application/json; charset=utf-8'
}
body = {
"coordinates": coords,
"options":{"avoid_features":["tollways"]},
"elevation":"true"
}
response = requests.post(url, headers = headers, json = body)
I’ve also verified the same request in OSR Maps and it displays the routes correctly (avoiding tolls when specified).
Thank you very much in advance!!
2 Likes