mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-07-31 11:50:27 +02:00
Fix Issue with fixed Width
This commit is contained in:
@@ -221,7 +221,19 @@ def get_streets(
|
||||
)
|
||||
else:
|
||||
# Dilate all streets by same amount 'width'
|
||||
streets = MultiLineString(streets.geometry.tolist()).buffer(width)
|
||||
streets= MultiLineString(
|
||||
streets[streets.geometry.type == "LineString"].geometry.tolist()
|
||||
+ list(
|
||||
reduce(
|
||||
lambda x, y: x + y,
|
||||
[
|
||||
list(lines)
|
||||
for lines in streets[streets.geometry.type == "MultiLineString"].geometry
|
||||
],
|
||||
[],
|
||||
)
|
||||
)
|
||||
).buffer(width)
|
||||
|
||||
return streets
|
||||
|
||||
|
Reference in New Issue
Block a user