[Tagging] Opening hours too long for OSM
Jmapb
jmapb at gmx.com
Thu Oct 11 21:47:06 UTC 2018
On 10/11/2018 5:21 PM, Tobias Zwick wrote:
> Hey there!
>
> So, a user of StreetComplete came across the following complicated
> opening hours for a shop (prettified):
>
> Jun-Sep: Mo-Sa 10:00-18:00;
> Jun-Sep: Su 10:00-12:00;
> Nov-Mar: Mo,Tu,Th,Fr 10:00-12:00, 15:00-17:00;
> Nov-Mar: Sa 10:00-12:00;
> Apr-May: Mo-Fr 10:00-12:30,15:00-18:00;
> Apr-May: Sa 10:00-12:30;
> Apr-May: Su 10:00-12:00;
> Oct: Mo-Fr 10:00-12:30,15:00-18:00;
> Oct: Sa 10:00-12:30;
> Oct: Su 10:00-12:00
>
> Unfortunately, this does not fit into the opening_hours value, as this
> is limited to 255 characters. What can we do?
>
> Is there any generic way to treat an overflowing tag? Perhaps use a
> second key to store the rest, something like (in this case)
>
> opening_hours=Jun-Sep: Mo-Sa 10:00-18:00;Jun-Sep: Su
> 10:00-12:00;Nov-Mar: Mo,Tu,Th,Fr 10:00-12:00, 15:00-17:00;
> Nov-Mar: Sa 10:00-12:00;Apr-May: Mo-Fr 10:00-12:30,15:00-18:00;Apr-May:
> Sa 10:00-12:30;Apr-May: Su 10:00-12:00;Oct: Mo-Fr
> 10:00-12:30,15:00-18:00;Oct: Sa 10
> opening_hours_1=:00-12:30;Oct: Su 10:00-12:00
>
> ?
>
> Greetings
> Tobias
>
Do we really need to re-declare the month ranges each time? I would
think that
opening_hours=Jun-Sep: Mo-Sa 10:00-18:00; Su10:00-12:00; Nov-Mar:
Mo,Tu,Th,Fr 10:00-12:00, 15:00-17:00; Sa 10:00-12:00; Apr-May: Mo-Fr
10:00-12:30,15:00-18:00; Sa 10:00-12:30; Su 10:00-12:00; Oct: Mo-Fr
10:00-12:30,15:00-18:00; Sa 10:00-12:30;Oct: Su 10:00-12:00
...would work just as well. Seems to pass muster at
openingh.openstreetmap.de and it's a svelte 251 chars.
This doesn't answer the real question of course, because certainly
longer values are possible, especially when exceptions for holidays etc
are tacked on. Lengthening the field would be great, but failing that I
suppose opening_hours_1 is an ok stopgap, though it's unlikely there's
any end-user software that will look for it. One thing I'd recommend,
though, is not to end truncate the value mid-clause. In your example,
I'd probably put all of October in opening_hours_1 so that the standard
opening_hours tag is correct and parseable on its own.
J
More information about the Tagging
mailing list