Skip to content

Commit

Permalink
add MaxweightExtraValue (#2322)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-marc-marc authored Sep 9, 2024
1 parent bb8ed0b commit ecc157d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/Number.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def init(self, logger):
self.MaxspeedExtraValue = ["none", "default", "signals", "national", "no", "unposted", "walk", "urban", "variable"]
self.MaxspeedClassValue = re.compile(u'^[A-Z]*:')
self.MaxheightExtraValue = ["default", "below_default", "no_indications", "no_sign", "none", "unsigned"]
self.MaxweightExtraValue = ["unsigned"]

def node(self, data, tags):
for i in self.tag_number:
Expand All @@ -101,7 +102,8 @@ def node(self, data, tags):
self.MaxspeedClassValue.match(tags[tag]) or
(tags[tag] == "implicit" and ("traffic_sign" in tags) and "maxspeed" in tags["traffic_sign"].split(";"))
)) and
not (tag == "maxheight" and tags[tag] in self.MaxheightExtraValue)
not (tag == "maxheight" and tags[tag] in self.MaxheightExtraValue) and
not (tag.split(":", 1)[0] == "maxweight" and tags[tag] in self.MaxweightExtraValue)
):
return {"class": 3091, "subclass": 1, "text": T_("Concerns tag: `{0}`", '='.join([tag, tags[tag]])) }
if not m:
Expand Down

0 comments on commit ecc157d

Please sign in to comment.