pyinterp.geometry.cartesian.MultiPolygon#
- class pyinterp.geometry.cartesian.MultiPolygon(self, polygons: collections.abc.Sequence[pyinterp.core.geometry.cartesian.Polygon] | None = None)#
Bases:
objectA collection of polygons in Cartesian coordinates.
Behaves like a Python container of Polygon objects.
Construct a multipolygon from an optional sequence of polygons.
- Parameters:
polygons – Optional sequence of Polygon objects.
Attributes
View over polygons bound to multipolygon lifetime.
Public Methods
append(self, poly)Append a polygon to the collection.
clear(self)Remove all polygons from the collection.
Special Methods
__bool__(self)Return True if not empty.
__eq__(self, other)Check if two multipolygons are equal.
__getitem__(self, arg, /)Get polygon at index.
__getstate__(self)Return the state of the MultiPolygon for pickling.
__iter__(self)Iterate over polygons.
__len__(self)Number of polygons.
__ne__(self, other)Check if two multipolygons are not equal.
__new__(*args, **kwargs)__repr__(self)Return the official string representation of the MultiPolygon.
__setitem__(self, idx, poly)Set polygon at index.
__setstate__(self, state)Restore the state of the MultiPolygon from pickling.
__str__(self)Return the informal string representation of the MultiPolygon.