[Tagging] Fixing wrong opening_hours automatically

Robin `ypid` Schneider ypid23 at aol.de
Tue Mar 11 21:59:19 UTC 2014

On 08.03.2014 16:37, fly wrote:
> On 06.03.2014 19:12, Stephan Knauss wrote:
>> Robin `ypid` Schneider writes:
>>> I mean the correction
>>> '0930-0630' -> '09:30-06:30'*
>>> seams quite straight forward and I guess if someone aware of the wiki
>>> page about
>>> opening_hours will find such a value he/she will change it by hand
>>> anyway.
>>> I assume that this will improve the data quality and will not lead to
>>> opposite.
>>> * value unlikely for this facility: added fixme node:
>>> http://www.openstreetmap.org/node/2600853055/history
>> This is a perfect example of a change which should *NOT* be automated.
>> with the "0930-0630" syntax it's easy to highlight on a quality check
>> tool as the syntax is wrong.
>> By checking the syntax a human would likely notice that the opening hour
>> might be fine for a fast-food restaurant, but not for a government
>> passport office.
>> So a human mapper would not only fix the syntax, but also fix the wrong
>> usage of a 12 hour time format and write "09:30-18:30", probably even
>> noticing it's not open every day and writing "Mo-Fr 09:30-18:30".
>> When your bot would have changed it to "09:30-06:30" it's a lot more
>> difficult to actually spot this suspicious data.
Point for you. I guess I can not correct this case only with a script because of
this special case I was not really aware of. I will be more careful here.

> You could run bots to find these errors and illustrate them but you
> should touch the values this way.
You mean "should not"? I agree … This value has to be checked by a human as
described above.

I already run 'bots' (better called scripts in this case) to find opening_hours
which can not be parsed: https://github.com/ypid/opening_hours.js#large-scale

Or on a map: http://openingh.openstreetmap.de/?setLng=en

> Though, I am happy that you did not try to delete "nach vereinbarung" as
> some mapper did with my "appointment" but is seems that this should be
> added as value.
Are there any thoughts about that second rule.
* 'nach vereinbarung' -> '"nach Vereinbarung"'
which would only impact German values? Or are there also some special cases
which I did not think of?

> JOSM Validator already warns about wrong syntax but it does not accept
> "appointment" or by "appointment".
? JOSM Validator for opening_hours uses the same library in the background as
and when I test the value '"appointment"' (excluding the single quotes) it does
not show any warnings.

Live long and prosper
Robin Schneider

More information about the Tagging mailing list