pyinterp.geodetic.MultiPolygon#

class pyinterp.geodetic.MultiPolygon(polygons: list[Polygon] | None = None)[source]#

Bases: MultiPolygon

The multi-polygon contains a list of polygons.

Parameters:

polygons – list of polygons. If this argument is not defined, the instance manages an empty list of polygons.

Raises:

ValueError – if polygons is not a list of pyinterp.geodetic.Polygon.

Inherited Methods

append(self, polygon)

Appends a polygon to this instance.

area(self[, wgs])

Calculates the area.

covered_by(*args, **kwargs)

Overloaded function.

distance(*args, **kwargs)

Overloaded function.

envelope(self)

Calculates the envelope of this multi-polygon.

from_geojson(array)

Initializes a MultiPolygon from a GeoJSON coordinate array.

intersection(*args, **kwargs)

Overloaded function.

intersects(*args, **kwargs)

Overloaded function.

num_interior_rings(self)

Returns the number of the interior rings of all polygons.

read_wkt(wkt)

Parses OGC Well-Known Text (WKT) into a multi-polygon.

to_geojson(self)

Return the multi-polygon as a GeoJSON type.

touches(*args, **kwargs)

Overloaded function.

union(*args, **kwargs)

Overloaded function.

wkt(self)

Gets the OGC Well-Known Text (WKT) representation of this instance.