ltog / osmi-addresses

Calculates the Address view of the OSM Inspector
Boost Software License 1.0
11 stars 4 forks source link

Use of commas in addr:housenumber value erroneously tagged as error #107

Closed simonpoole closed 6 years ago

simonpoole commented 7 years ago

See http://tools.geofabrik.de/osmi/?view=addresses&lon=8.81706&lat=47.22744&zoom=18&overlays=postal_code,entrances_deprecated,entrances,no_addr_street,street_not_found,place_not_found,misformatted_housenumber,nodes_with_addresses_defined,nodes_with_addresses_interpolated,interpolation,interpolation_errors,connecti But according to https://wiki.openstreetmap.org/w/index.php?title=Addresses&oldid=1074955 (older version to avoid some wiki fiddling) using commas is quite OK and you will actually find it quite commonly.

grischard commented 7 years ago

Would https://github.com/ltog/osmi-addresses/blob/757b1804cbfdb3ccc223adc8b74279a326a4d4ce/mapserver/addresses.local.map#L896 be the line that needs tweaking?

ltog commented 7 years ago

@grischard : Thanks for looking it up. Yes, that should be it. I propose to not replace the line but to add another layer with changed settings to have two layers such as misformatted_housenumber_strict and misformatted_housenumber_lenient. (I actually still think the housenumbering format described by @simonpoole is not desirable because it's difficult to extract, therefore I would keep a strict format.)

The proposed change shouldn't need any changes in the C++ code and should therefore be relatively easy. @woodpeck would certainly include the change to show it on the map.

@grischard : Have you already come up with a regex or should I have a look at it?

grischard commented 7 years ago

'^[1-9][0-9]{0,2}[A-Z]{0,3}([-,]*[1-9][0-9]{0,2}[A-Z]{0,3}){0,12}$' covers my lenient needs for Luxembourg, and should be good enough until someone finds the time to work on #93.

ltog commented 7 years ago

@grischard : I propose the following changes:

ltog commented 7 years ago

@grischard : Now I remember... I don't knew and still don't know how to invert regexes in UMN Map Server (the software drawing the WMS of the OSM inspector).

Unless you or someone else knows how to do it, I will for the time being just add a new layer that won't flag commas or dashes. That should remove a lot of false positives (but will also hide some true positives).

johsin18 commented 6 years ago

So currently, the version running on geofabrik.de (branch currently_running_on_geofabrik_server) accepts commas, but the master branch does not. Can we merge this into master, please?

Branch currently_running_on_geofabrik_server accepts slashes as well (which I like), but it should be extended to even allow numbers followed by (upper-case) letters after the slash, as needed here for example "50/3A": https://www.leonberg.de/Gesundheitsamt-.php?object=tx,1.801.1&ModID=9&FID=2155.454.1&La=1