mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-02 02:41:57 +02:00
Issue #45: support parsing from tags.
This commit is contained in:
parent
acfeee97eb
commit
62f10ab647
2 changed files with 10 additions and 4 deletions
|
@ -202,9 +202,12 @@ class Road(Figure):
|
|||
self.matcher: RoadMatcher = matcher
|
||||
|
||||
self.width: Optional[float] = None
|
||||
self.lanes: int = 1
|
||||
|
||||
if "lanes" in tags:
|
||||
try:
|
||||
self.width = float(tags["lanes"]) * 3.7
|
||||
self.lanes = float(tags["lanes"])
|
||||
except ValueError:
|
||||
pass
|
||||
if "width" in tags:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue