Several years ago, I added a barrier=gate with access=private and locked=yes on the node between this highway=steps and highway=footway. However, both osm.org and Osmand happily route through it.
Is this a bug in both routers? Or is there a sure-fire way I can indicate that you can’t get through this gate that actually prevents routing in well-written routers?
Just to check the situation, are the paths (or steps where relevant) both north and south of the gate open to the public, and the only thing the public can’t do is pass the gate from one public section to the other?
As far as I remember, I have only seen it from the southern side. The northern side may be inaccessible, I don’t know. (I was trying to catch a train, and because the path, that I thought was public, was blocked and I had to take a large detour, I had to hurry and couldn’t check the northern side).
I am also interested in the theoretical question: what if a gate or door (not this particular one) is publicly accessible from both sides, but permanently closed? How to properly and robustly map such a situation in general?
What if you change it to foot=private instead of access=private?
Is there a bug when it comes to gates on steps / paths? Very occasionally, the routing software will do odd things, like not letting pedestrians past barrier=lift_gate (in case they bang their head?)
Per the discussion in the other thread, it sounds like routing foot traffic through access=private was intentional, with the reasoning being that often barriers are mis-tagged with access=private when only motor vehicles are blocked and foot traffic is allowed through. So does that mean tagging foot=no on this gate would also solve the problem?
Yesterday my graphhopper code change was me merged. This will block the gate under discussion once new OSM data is used.
You wrote that you intended to add tagging foot=no, but actually added foot=private, which is a difference. You are lucky that even after the code change this modification will not revert the result back to the original observed case.
Interpretation of the OSM tagging sometimes is not that easy. See this discussion for the reasoning behind opening locked=yes in certain cases.
By the way, on the Graphhopper online instance it is possible to see the date of the OSM data, which was used to build the routing graph. It is a little bit hidden, but it is there if you click on “Details” and open the route instructions:
locked=yes alone should suffice for most routers, but an additional access=no will prevent most[1] of them from routing through.
Here is one such example, the southern road has always been open to public, the northern road used to be inside a military area up until 2012, but is now accessible as well. The gate is still locked to this day.
In my example below, OSRM with the car profile still tries to route through the gate: OpenStreetMap↩︎
I guess the question then is why doesn’t access=private do the same thing? access=no seems a bit strong for a feature like a gate which is literally designed to be able to be opened to allow access.