brouter icon indicating copy to clipboard operation
brouter copied to clipboard

profile=hiking-mountain routes over way with foot=no

Open vincentius63 opened this issue 1 year ago • 12 comments

Hi,

http://www.brouter.de/brouter-web/#map=16/49.4824/8.4732/osm-mapnik-german_style&lonlats=8.469056,49.480667;8.466704,49.47854&profile=hiking-mountain

brouter-web routes through the "Tunnelstraße". This way is currently set with access foot=no because of construction works https://www.openstreetmap.org/way/114399554#map=17/49.47835/8.46851

Most bike profiles do it right: http://www.brouter.de/brouter-web/#map=16/49.4824/8.4732/osm-mapnik-german_style&lonlats=8.469056,49.480667;8.466704,49.47854

Best regards Vinzenz

vincentius63 avatar Jul 30 '23 17:07 vincentius63

It belongs rather here: https://github.com/poutnikl/Brouter-profiles/issues

Most bikes do not ride on sidewalks.

I have noticed I have set foot access right, but then decided if there is no footaccess but is there bikeaccess, it falls back to be allowed with penalty 4, being taken, if the detour is 5x times longer.

While it affect all foot profiles, it is rather funny you have used hiking mountain profile for city walking.

poutnikl avatar Jul 30 '23 18:07 poutnikl

@poutnikl, the problem is the issidewalk logic.

quaelnix avatar Jul 30 '23 18:07 quaelnix

Yes, but that is tricky, as foot=no applies on the main road, while there is a sidewalk.

If I set it to deny foot access, it could cause regression of denying access for all roads with no foot access, where footways/paweways/sidewalks are not mapped as an independent OSM highway=*, but are mapped as the main road feature sidewalk=left|right|both|yes

So the profile rather correctly follows "OSM reality" which incorrectly follows "real reality".

poutnikl avatar Jul 30 '23 19:07 poutnikl

@poutnikl, the problem is the issidewalk logic.

Hmm, you seem right.

as workaround until profiles are fixed, you can modify and manually upload the profile to the BRouter server

with modification assign issidewalk and not foot=no sidewalk=left|right|both|yes

instead of original assign issidewalk sidewalk=left|right|both|yes

poutnikl avatar Jul 30 '23 19:07 poutnikl

I would suggest that we don't fix this bug because, as you said, it would very likely do more harm than good.

quaelnix avatar Jul 30 '23 20:07 quaelnix

I quite agree with you. there will be always false positives (routing via denied roads) and false negatives (avoiding available roads). One then has to evaluate pros and cons of "allow/deny always". For one correctly denied pass, there can be multiple incorrectly denied passes.

Very little seriously, a mountain hiker cannot be deterred by denied passage More seriously, I am for respecting laws and directions, obviously.

poutnikl avatar Jul 31 '23 10:07 poutnikl

While it affect all foot profiles, it is rather funny you have used hiking mountain profile for city walking.

It's the only walking profile in brouter-web. Because of that I used this as this issue came up in https://community.openstreetmap.org/t/fussgangerrouting-trotz-foot-no/101846

vincentius63 avatar Aug 01 '23 07:08 vincentius63

I see. I seldom use Brouter web, usually only for convenient profile testing during development of my profile templates, or using my own uploaded profiles.

Note that all my foot profiles are based on the single template so all behave the same way here.

There is suspicion that denying access for proerly tagged foot=no for road under construction will deny access for road in properly tagged foot=no with denied access for walking on the main road only, while there are sidewalking structures.

Bike profiles do not have this issue for obvious reasons.

poutnikl avatar Aug 01 '23 07:08 poutnikl

@poutnikl, what if we would replace:

or issidewalk

with:

or and issidewalk not access=no

This would likely almost exclusively affect ways that are closed for construction.

quaelnix avatar Aug 02 '23 08:08 quaelnix

Unfortunately it's not that simple. To make it really work, we would need something ugly like this:

or and issidewalk not ( and access=no and ( or bicycle= bicycle=no ) and ( or motor_vehicle= motor_vehicle=no ) and ( or bus= bus=no ) ( or psv= psv=no ) )

This would fix ~ 90 % of all the cases in europe: https://overpass-turbo.eu/s/1ymG


Here are some more test cases:

  • https://brouter.de/brouter-web/#map=19/48.18555/16.35446/standard&lonlats=16.354879,48.185947;16.354085,48.185602&profile=hiking-mountain
  • https://brouter.de/brouter-web/#map=19/48.96329/2.37009/standard&lonlats=2.371061,48.963926;2.368793,48.963007&profile=hiking-mountain
  • https://brouter.de/brouter-web/#map=19/48.81165/2.38439/standard&lonlats=2.384151,48.811109;2.384558,48.812082&profile=hiking-mountain
  • https://brouter.de/brouter-web/#map=18/48.82719/2.22321/RRZE&lonlats=2.222486,48.82716;2.227284,48.826245&profile=hiking-mountain

quaelnix avatar Aug 02 '23 10:08 quaelnix

Or
assign issidewalk   if  (sidewalk=left|right|both|yes) 
   then ( not ( and access=no
                     and ( or bicycle= bicycle=no ) 
                     and ( or motor_vehicle= motor_vehicle=no ) 
                     and ( or bus= bus=no ) 
                           ( or psv= psv=no ) 
                      )
           ) 
   else false

poutnikl avatar Aug 02 '23 11:08 poutnikl

Thank you for your great work. I feared that it was not easy.

Best regards

vincentius63 avatar Aug 04 '23 06:08 vincentius63