Open d1g opened 8 years ago
The maxstay
key is not related to the opening_hours syntax AFAIK. It is currently not handled by @opening-hours and I am not sure if it would be a fit.
Some users (<2%) were using combined values in maxstay=* - http://taginfo.openstreetmap.org/tags/maxstay=120%20%40%20Mo-Fr%2008%3A00-18%3A00#overview
Probably we can re-tag them as opening_hours=Mo-Fr 08:00-18:00 maxstay=120 m
True that maxstay=* is more about "duration" (maximum possible) than about OH/schedules
Retagging as you proposed sounds good :wink: I am closing this for now. Feel free to comment.
Ah now I get it. The @ (<opening_hours syntax>)
notation is used for other tags as well and I already thought about that :wink:
As it is documented in Key:maxstay the value 1 @ (08:00-18:00)
is supported. The program that evaluates this (like OSMAnd) should parse the 1 @ (08:00-18:00)
and can then hand the 08:00-18:00
to the @opening-hours tools for further processing.
The @opening-hours tools currently do not evaluate tags which support the @
notation syntax. If there is a list of those tags this could be added to the statistics. Thanks for the hint :+1:
PS: I think I read something that OSMAnd has support for the @
notation for other keys.
Well most important tags with "@" values are also quite complex: http://wiki.openstreetmap.org/wiki/Conditional_restrictions
It feels like you need a separate grammar only for Conditional restrictions :elephant:
The good thing is the opening_hours-statistics only needs to worry about the part in the parentheses :wink:
I imaging some value preparation for the statistics which could be based on regular expression substitution like s/^\S+\s*@\s*\((.*)\).*$/\1/;
.
What do you think?
More than acceptable for stats, but it is possible to have multiple @@
120 @ (06:00-20:00); 100 @ (22:00-06:00)
Before matching against regex with one "@", check if string contains only one "@"
http://taginfo.openstreetmap.org/keys/maxstay#values - search for "@" here
Is this tag used by reports? I wasn't able to find it using Github seach