Snap prevention should probably also consider access control levels
I feel like GraphHopper almost got snap prevention right.
Describe the bug
Currently, GraphHopper allows using the snap_prevention parameter to prevent snapping waypoints to certain types of roads. Here, we focus on the motorway and trunk options.
Both motorway and trunk options are "freeway options". This seems to point towards "we can prevent snapping to freeways". Then, I notice that there are roads not tagged as motorway or trunk, but are quite "freeway-like". These roads are tagged with access_control=full (elaborated below).
To Reproduce
N/A
Expected behavior
GraphHopper should allow us to prevent snapping to "freeway-like roads", in addition to existing motorway and trunk options.
This can be done by having a new snap prevention option full_access_control (or other appropriate name) that prevents snapping to the following roads:
- any road with
access_control=full - any road with
highway=motorway - any road with
highway=motoway_link
Quoting the access_control=full Wiki page:
access_control=full[...] Implied byhighway=motorway.
The existing motorway option is very similar to the proposed new option.
System Information
N/A
Screenshots & Logs
N/A
Source: graphhopper/graphhopper