Skip to content

Commit

Permalink
Allow bis and ter in housenumber in Switzerland (#1456)
Browse files Browse the repository at this point in the history
* Allow bis and ter in housenumber in Switzerland

* Update plugins/TagFix_Housenumber.py

Co-authored-by: imagoiq <[email protected]>
Co-authored-by: Frédéric Rodrigo <[email protected]>
  • Loading branch information
3 people authored May 19, 2022
1 parent b5c7059 commit c3fa8c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/TagFix_Housenumber.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def init(self, logger):
if country == 'CH':
# From open data from cantons Zurich and Bern. See also https://github.com/ltog/osmi-addresses/issues/93
# Plus allows commas with multiple numbers
ch_number = "[1-9][0-9]{0,3}( ?[a-zA-Z])?"
ch_number = "[1-9][0-9]{0,3}( ?[a-zA-Z]{1,3})?"
self.housenumber = re.compile(r"^(:?{0})(:?,{0})?$".format(ch_number))
elif country == 'CZ':
# https://wiki.openstreetmap.org/wiki/Cs:WikiProject_Czech_Republic/Address_system
Expand Down Expand Up @@ -152,6 +152,7 @@ class father:
a.init(None)

assert not a.node(None, {"addr:housenumber": "313A"})
assert not a.node(None, {"addr:housenumber": "1bis"})
assert not a.node(None, {"addr:housenumber": "1"})
assert not a.node(None, {"addr:housenumber": "1,2"})
assert a.node(None, {"addr:housenumber": "1;2"})
Expand Down

0 comments on commit c3fa8c3

Please sign in to comment.