mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-08-01 12:20:37 +02:00
Fix Issue with fixed Width
This commit is contained in:
@@ -221,7 +221,19 @@ def get_streets(
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# Dilate all streets by same amount 'width'
|
# 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
|
return streets
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user