mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-31 09:56:24 +02:00
Issue #85: add width:lanes tag.
This commit is contained in:
parent
e0988fbe0f
commit
7e010ab191
1 changed files with 8 additions and 0 deletions
|
@ -390,6 +390,14 @@ class Road(Tagged):
|
|||
except ValueError:
|
||||
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]
|
||||
|
||||
number: int
|
||||
if "lanes:forward" in tags:
|
||||
number = int(tags["lanes:forward"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue