mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-02 19:02:12 +02:00
Issue #45: support lanes.
Assume road width on the basis of lanes number.
This commit is contained in:
parent
02459a6af0
commit
b086b0d108
1 changed files with 5 additions and 0 deletions
|
@ -193,6 +193,11 @@ class Road(Figure):
|
|||
self.matcher: RoadMatcher = matcher
|
||||
|
||||
self.width: Optional[float] = None
|
||||
if "lanes" in tags:
|
||||
try:
|
||||
self.width = float(tags["lanes"]) * 3.7
|
||||
except ValueError:
|
||||
pass
|
||||
if "width" in tags:
|
||||
try:
|
||||
self.width = float(tags["width"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue