Created
February 4, 2015 21:38
-
-
Save sgillies/4b4bc949079b7c77164b to your computer and use it in GitHub Desktop.
unary union
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from shapely.ops import unary_union | |
>>> from shapely.geometry import shape | |
>>> unary_union([shape(g) for g, v in shapes(red, mask=(red < 250))]) | |
<shapely.geometry.multipolygon.MultiPolygon object at 0x107c1b5d0> | |
>>> unary_union([shape(g) for g, v in shapes(red, mask=(red < 10))]) | |
<shapely.geometry.multipolygon.MultiPolygon object at 0x105844310> | |
>>> import shapely | |
>>> print shapely.geos.geos_version | |
(3, 4, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment