Issue #45: support parsing from tags.

This commit is contained in:
Sergey Vartanov 2021-06-01 02:46:02 +03:00
parent acfeee97eb
commit 62f10ab647
2 changed files with 10 additions and 4 deletions

View file

@ -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: