mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-22 13:36:26 +02:00
Issue #45: support width tag for roads.
Compute road width from width=* tag if specified.
This commit is contained in:
parent
3abd2a1769
commit
4b88b64f86
3 changed files with 37 additions and 30 deletions
|
@ -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:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue