Discussion:
[Community] Fwd: shapely multipolygon
Jassin MEKNASSI
2009-11-26 22:35:43 UTC
Permalink
hi I want to union all the polygons in a list of elements and get all the distinct polygons at the end.
union seems to produce a polygon if the 2 objects intersect and a multipolygon if not.
If i Union all the elements in a polygon set i would get at the en only one multipolygon. (reduce +lambda + union)
How can i get the distinct polygons objects from a multipolygon?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20091126/6893be0b/attachment.htm>
Sean Gillies
2009-11-27 08:39:54 UTC
Permalink
hi I want to union all the polygons in a list of elements and get
all the distinct polygons at the end.
union seems to produce a polygon if the 2 objects intersect and a multipolygon if not.
If i Union all the elements in a polygon set i would get at the en
only one multipolygon. (reduce +lambda + union)
How can i get the distinct polygons objects from a multipolygon?
Thanks
Multipart geometries have a "geoms" attribute that you can use to
iterate over the parts.

Cheers,

--
Sean

Loading...