pyinterp.core.geodetic.Polygon

class pyinterp.core.geodetic.Polygon

Bases: pybind11_builtins.pybind11_object

The polygon contains an outer ring and zero or more inner rings.

__init__(self: pyinterp.core.geodetic.Polygon, outer: list, inners: Optional[list] = None) None

Constructor filling the polygon.

Parameters
  • outer (list) – outer ring.

  • inners (list, optional) – list of inner rings.

Raises
  • ValueError – if outer is not a list of pyinterp.geodetic.Point.

  • ValueError – if inners is not a list of list of pyinterp.geodetic.Point.

Methods

Polygon.area(self[, wgs])

Calculates the area.

Polygon.covered_by(*args, **kwargs)

Overloaded function.

Polygon.distance(*args, **kwargs)

Overloaded function.

Polygon.envelope(self)

Calculates the envelope of this polygon.

Polygon.read_wkt(wkt)

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

Polygon.wkt(self)

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

Polygon.__eq__(self, other)

Overrides the default behavior of the == operator.

Polygon.__getstate__(self)

Polygon.__hash__

Polygon.__ne__(self, other)

Overrides the default behavior of the != operator.

Polygon.__repr__(self)

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

Polygon.__setstate__(self, arg0)