pyinterp.core.geodetic.MultiPolygon

Contents

pyinterp.core.geodetic.MultiPolygon#

class pyinterp.core.geodetic.MultiPolygon(self, polygons: list[pyinterp.core.geodetic.Polygon])#

Bases: pybind11_object

Create a MultiPolygon collection of polygons.

Parameters:

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.

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)

Return the number of 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)

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

Special Methods

__add__(self, other)

Override the + operator to concatenate two MultiPolygons.

__contains__(self, polygon)

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

__copy__(self)

Implement the shallow copy operation.

__eq__(self, other)

Override the default behavior of the == operator.

__getitem__(self, index)

Return the polygon at the given index.

__getstate__(self, /)

__iadd__(self, other)

Override the default behavior of the += operator.

__iter__(self)

__len__(self)

Return the number of polygons in this instance.

__ne__(self, other)

Override the default behavior of the != operator.

__repr__(self)

Return the string representation of this multi-polygon.

__setstate__(self, arg0)