Fix lane parsing.

This commit is contained in:
Sergey Vartanov 2021-10-22 02:38:34 +03:00
parent 6cb0985f49
commit fc6428e01e
2 changed files with 41 additions and 9 deletions

View file

@ -393,12 +393,15 @@ class Road(Tagged):
pass
if "width:lanes" in tags:
widths: list[float] = list(
map(float, tags["width:lanes"].split("|"))
)
if len(widths) == len(self.lanes):
for index, lane in enumerate(self.lanes):
lane.width = widths[index]
try:
widths: list[float] = list(
map(float, tags["width:lanes"].split("|"))
)
if len(widths) == len(self.lanes):
for index, lane in enumerate(self.lanes):
lane.width = widths[index]
except ValueError:
pass
number: int
if "lanes:forward" in tags: