class pyinterp.core.geodetic.MultiPolygon#

Bases: pybind11_object

A MultiPolygon is a collection of polygons.


polygons – The polygons to use.

Public 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.


Calculates the envelope of this multi-polygon.


Initializes a MultiPolygon from a GeoJSON coordinate array.

intersection(*args, **kwargs)

Overloaded function.

intersects(*args, **kwargs)

Overloaded function.


Returns the number of the interior rings of all polygons.


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


Return the multi-polygon as a GeoJSON type.

touches(*args, **kwargs)

Overloaded function.

union(*args, **kwargs)

Overloaded function.


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

Special Methods

__add__(self, other)

Overrides the + operator to concatenate two MultiPolygons.

__contains__(self, polygon)

True if the multi-polygon has the specified polygon, else False


Implements the shallow copy operation.

__eq__(self, other)

Overrides the default behavior of the == operator.

__getitem__(self, index)

Returns the polygon at the given index.


__iadd__(self, other)

Overrides the default behavior of the += operator.



Returns the number of polygons in this instance.

__ne__(self, other)

Overrides the default behavior of the != operator.


Called by the repr() built-in function to compute the string representation of a point.

__setstate__(self, arg0)