organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
9.81k stars 943 forks source link

Opening hours not parsed due to non-standard dash #3888

Open RedAuburn opened 1 year ago

RedAuburn commented 1 year ago

Found opening-hours that should have been parsed: Mo-Sa 07:00–18:00; Su 09:00-14:00 (https://www.openstreetmap.org/node/5022879262) on closer inspection, the dash between Mo & Sa is actually an En Dash instead of a standard Hyphen-Minus. technically this is an OSM data issue, but it would be good to handle it.

need to convert all similar dashes in the generator (although not characters within quotation marks): HYPHEN NON-BREAKING HYPHEN FIGURE DASH EN DASH SMALL EM DASH ۔‎ ARABIC FULL STOP HYPHEN BULLET ˗ MODIFIER LETTER MINUS SIGN MINUS SIGN HEAVY MINUS SIGN COPTIC CAPITAL LETTER DIALECT-P NI

(similar characters found from https://www.unicode.org/Public/security/15.0.0/confusables.txt)

biodranik commented 1 year ago

Should these dashes be replaced only in opening_hours tags, or also somewhere else?

RedAuburn commented 1 year ago

Anywhere that makes use of the opening_hours specification. It'd be good to have a generic function to correct opening_hours-like values like this

matheusgomesms commented 7 months ago

Just to chime in, I'm trying to fix this on OSM data. But of course, there is no guarantee, after fixing, that this will happen again. For an example, OsmAND can parse the data, even with non-standard dashes.

biodranik commented 7 months ago

Converting dashes in the generator specifically for opening hours is a good idea. Maybe there are other chars too that we can normalize? Numbers? punctuation? Did someone run the analysis?

matheusgomesms commented 5 months ago

Converting dashes in the generator specifically for opening hours is a good idea. Maybe there are other chars too that we can normalize? Numbers? punctuation? Did someone run the analysis?

Check some analysis here, please: https://community.openstreetmap.org/t/automated-edit-proposal-convert-non-standard-dashes-to-standard-dashes/110206/50 (ran by @westnordost)