abrensch / brouter

configurable OSM offline router with elevation awareness, Java + Android
MIT License
490 stars 118 forks source link

Bicycle route passes through `barrier=gate` with `bicycle=no` #480

Closed hiddewie closed 1 year ago

hiddewie commented 1 year ago

Thanks for the great work you are doing on improving bicycle routing around the world.

I found an issue with routing through barrier=gate which is not accessible for bicycles.

Example: https://brouter.de/brouter-web/#map=17/52.03651/6.63080/standard,terrarium-hillshading,Waymarked_Trails-Cycling&lonlats=6.634551,52.038369;6.627932,52.036693

image

This route is not possible, because there is a barrier, impassable by bicycles. See https://www.openstreetmap.org/node/726774608#map=19/52.03757/6.62909.

image

BRouter should avoid these nodes.

polyscias commented 1 year ago

Yes, agreed in this cause you would expect the route to go not via this gate.

Very often brouter standard profiles assume that for objects tagged with bicycle=no but (implicit) foot=yes, cyclist can still access but walking with the bike and that is also here the case, see the end of the Trekking profile.

I see barrier=gate + bicycle=no is 1363 times mapped in the Netherlands, I wonder how many of these 1363 should be bicycle=dismount instead of bicycle=no. barrier=gate + bicycle=dismount is only 155 times mapped in the Netherlands.

hiddewie commented 1 year ago

Thanks for the reaction.

I checked some more nodes in my neighborhood that have barrier=gate and bicycle=no, and indeed many would be passable with a (trekking) bike. So many of these gates should be bicycle=dismount.

Some of the paths also explicitly have bicycle=no and foot=yes (e.g. https://www.openstreetmap.org/way/473026471#map=17/52.25256/6.87518, gate https://www.openstreetmap.org/node/4672015993) and the router avoids those, probably because the route cost / penalty is much larger for ways than for a single node.

So I think the case of my barrier / route is exceptional, and I can live with excluding the barrier manually with a geofence from the generated routes. I will close this issue.