Issue #45: support width tag for roads.

Compute road width from width=* tag if specified.
This commit is contained in:
Sergey Vartanov 2021-05-28 04:52:15 +03:00
parent 3abd2a1769
commit 4b88b64f86
3 changed files with 37 additions and 30 deletions

View file

@ -192,6 +192,13 @@ class Road(Figure):
super().__init__(tags, inners, outers)
self.matcher: RoadMatcher = matcher
self.width: Optional[float] = None
if "width" in tags:
try:
self.width = float(tags["width"])
except ValueError:
pass
def line_center(nodes: List[OSMNode], flinger: Flinger) -> np.array:
"""