Skip to content

Commit c3fa8c3

Browse files
Loïc Fürhoffimagoiqfrodrigo
authored
Allow bis and ter in housenumber in Switzerland (#1456)
* 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]>
1 parent b5c7059 commit c3fa8c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/TagFix_Housenumber.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def init(self, logger):
5353
if country == 'CH':
5454
# From open data from cantons Zurich and Bern. See also https://github.com/ltog/osmi-addresses/issues/93
5555
# Plus allows commas with multiple numbers
56-
ch_number = "[1-9][0-9]{0,3}( ?[a-zA-Z])?"
56+
ch_number = "[1-9][0-9]{0,3}( ?[a-zA-Z]{1,3})?"
5757
self.housenumber = re.compile(r"^(:?{0})(:?,{0})?$".format(ch_number))
5858
elif country == 'CZ':
5959
# https://wiki.openstreetmap.org/wiki/Cs:WikiProject_Czech_Republic/Address_system
@@ -152,6 +152,7 @@ class father:
152152
a.init(None)
153153

154154
assert not a.node(None, {"addr:housenumber": "313A"})
155+
assert not a.node(None, {"addr:housenumber": "1bis"})
155156
assert not a.node(None, {"addr:housenumber": "1"})
156157
assert not a.node(None, {"addr:housenumber": "1,2"})
157158
assert a.node(None, {"addr:housenumber": "1;2"})

0 commit comments

Comments
 (0)