Skip to content

Commit

Permalink
Merge pull request #720 from jdhoek/feature/dutch-housenumbers-fine-t…
Browse files Browse the repository at this point in the history
…uning

Additional fine-tuning of Dutch housenumbers check
  • Loading branch information
frodrigo authored Dec 26, 2019
2 parents 36ef46d + 129e75e commit b1d3ad1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/TagFix_Housenumber.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def init(self, logger):
"(([A-Z][1-9][0-9]{0,3})|"
# Normal base numbers, no leading zero, not exceeding 5 digits.
"([1-9][0-9]{0,4}))"
# Up to three optional extensions (can have leading zeroes in the extension part, e.g., '2K-008')
"([ -]?(([0-9]{1,4})|([A-Za-z]{1,5}))){0,3}$")
# Up to four optional extensions (can have leading zeroes in the extension part, e.g., '2K-008')
"([ -/]?(([0-9]{1,4})|([A-Za-z]{1,5}))){0,4}$")

def node(self, data, tags):
err = []
Expand Down Expand Up @@ -197,6 +197,12 @@ class father:
assert not a.node(None, {"addr:housenumber": "44d-G"})
assert not a.node(None, {"addr:housenumber": "3-0072"})

# Groningen-style extension.
assert not a.node(None, {"addr:housenumber": "16/1"})

# Naval base in Den Helder
assert not a.node(None, {"addr:housenumber": "100D-G29B"})

# Pekela
assert not a.node(None, {"addr:housenumber": "B54"})

Expand Down

0 comments on commit b1d3ad1

Please sign in to comment.