Opening hours tags

Hi all

I’m judging this to be a rendering question but if this is not the right forum, please redirect me:

This gate is open to the public at certain times and not others:
https://www.openstreetmap.org/node/2340870768

Is this useful information to include in the tags? - will a router send someone that way when it’s open and send them somewhere else when it’s not?

Thanks,

Edward

I am not sure if any current router evaluates hours. But I think you should rather use a conditional access restriction.

either
access=no
access:conditional = yes @ (Apr 01-Sep 30 Mo-Su,PH 08:00-18:00; Oct 01-Mar 31 Mo-Su,PH 08:00-16:00)

or

access=yes
access:conditional = no @ (Apr 01-Sep 30 Mo-Su,PH 00:00-08:00, 18:00-24:00; Oct 01-Mar 31 Mo-Su,PH 00:00-08:00, 16:00-24:00)

The first variant closes the gate for everyone and always if the conditional access is not evaluated, the second variant has it open by default.

Please chose the appropriate access tag (access, foot, bicycle, etc.) based on the situation. If the opening hours not only apply to the single gate but to the whole cementary you could put these restrictions also on the ways.

In order to make the gate routeable, there should be a highway way connecting the gate to the road.

Apart from that, I agree with TZorn that conditional restrictions would be the best tool for this situation. The semantics of opening_hours for access restrictions aren’t so well defined. For example: Is the foot=yes something that’s always true, i.e. pedestrians can enter at all times, and vehicles only during opening hours? Or can vehicles never enter, and pedestrians only during opening hours? Using conditional restrictions, you can make that unambiguous. The former would use access:conditional, the latter foot:conditional.

I believe OSM-based routers do not support time-dependent restrictions yet (at least I’m not aware of any that do). It can be quite tricky to support that properly, because even if the gate is currently open, it might be closed by the time you reach it. It’s not impossible, though, and I think mapping such data is still an useful addition. Otherwise, we might get into a hen-and-egg situation where developers don’t add the feature because mappers have not provided the data that would make the feature worthwhile, and vice versa.