mirror of
https://github.com/marceloprates/prettymaps.git
synced 2025-08-17 03:54:10 +02:00
Merge pull request #55 from JonFreer/main
Fix "Multi-part geometries do not themselves provide the array interface" when using non dict width
This commit is contained in:
@@ -323,7 +323,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