How can I convert MultiPolygon to Multiline?
I want to work with the boundary of multipolygon. In R I can just do :
as(my_multi_polygone, 'SpatialLines')
But I don't know how to do it in Python?
How can I convert MultiPolygon to Multiline?
I want to work with the boundary of multipolygon. In R I can just do :
as(my_multi_polygone, 'SpatialLines')
But I don't know how to do it in Python?
If multip is the collection of polygons representing the MultiPolygon collection.
multiLines = shapely.geometry.MultiLineString([x.exterior for x in multip])
multiLines = shapely.geometry.MultiLineString([x.exterior for x in multip.geometry])
– Elite
Feb 09 '19 at 20:59