pyinterp.core.geodetic.MultiPolygon

class pyinterp.core.geodetic.MultiPolygon

Bases: pybind11_object

A MultiPolygon is a 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)

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.

Protected Methods

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

__copy__(self)

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.

__getstate__(self)

__iadd__(self, other)

Overrides the default behavior of the += operator.

__iter__(self)

__len__(self)

Returns the number of polygons in this instance.

__ne__(self, other)

Overrides the default behavior of the != operator.

__repr__(self)

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

__setstate__(self, arg0)