graphhopper / graphhopper

Open source routing engine for OpenStreetMap. Use it as Java library or standalone web server.

Home Page:https://www.graphhopper.com/open-source/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

opening_hours is ignored for way

spixi opened this issue · comments

Describe the bug
Graphopper (foot profile) ignores opening_hours=Apr-Oct for the way Arno-Riedl-Brücke (way 39438001).

To Reproduce
https://www.openstreetmap.org/directions?engine=graphhopper_foot&route=50.55734%2C8.49799%3B50.55695%2C8.50133#map=18/50.55684/8.50081&layers=N

Expected behavior
The Arno-Riedl-Brücke is a temporary pontoon bridge, which is build in April and dismantled in October every year. So, it has opening_hours=Apr-Oct set. The current date is 2024-03-08, that means the bridge is not present and the routing should use the Alte Lahnbrücke (way 145899335) instead.

System Information
Windows 11, Google Chrome 97.0.4692.71

Screenshots & Logs
image

I'm not a fan of "tagging for the router" but in this case I think opening "hours" is the wrong way to tag something like this and instead conditional restrictions should be used, which we support.

(Soon we'll ignore this for foot too, but will show this in the path details for GH Maps)

@karussell Thank you for pointing this out. Would access:conditional=no @ (Nov-Mar) be the correct way to tag a seasonal temporary pontoon bridge?

Or would bicycle=designated and foot=designated overwrite access:conditional=no?

In that case, would the following be correct?

access=no
foot:conditional=designated @ (Apr-Oct)
bicycle:conditional=designated @ (Apr-Oct)

The tagging would then look good IMO, yes ... now I just looked in the rather complex definition of opening_hours it seems that the current tagging Apr-Oct is not wrong and the evaluation tool just says "Please add a time selector to this rule". So not sure.

Now regarding conditional restrictions: for GraphHopper we currently only support yes or no (and not designated) but this is something that we can fix. Still, as I indicated before, even when we fix this, the road will always stay accessible and we'd only show a warning in GH Maps and you could block it via using a special custom model. The reasoning behind this behaviour is discussed in this issue.

Furthermore this would mean e.g. for openstreetmap.org:

  1. there would be no warning (they do not show path details) and
  2. there is no possibility to block the way (they do not have custom model support).

For now I close this issue as we do not plan to add opening_hours support.