mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-05 04:12:08 +02:00
Fix lane parsing.
This commit is contained in:
parent
6cb0985f49
commit
fc6428e01e
2 changed files with 41 additions and 9 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue