[Tagging] Opening hours too long for OSM

Tobias Zwick osm at westnordost.de
Fri Oct 12 10:08:18 UTC 2018


>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.

Unfortunately, that does not work. According to the specs, every rule must specify its own months range. If you don't, that rule applies throughout the whole year. E.g.

Jun: Mo-Sa 10:00-18:00; Sun 10:00-12:00

is interpreted as "open Mo-Sa 10-18 o'clock in June, always open on Sunday 10-12 o'clock".

Tobias 

Am 11. Oktober 2018 23:47:06 MESZ schrieb Jmapb <jmapb at gmx.com>:
>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
>
>_______________________________________________
>Tagging mailing list
>Tagging at openstreetmap.org
>https://lists.openstreetmap.org/listinfo/tagging



More information about the Tagging mailing list