pyinterp.geodetic.Polygon#

class pyinterp.geodetic.Polygon(outer: List[pyinterp.geodetic.Point], inners: Optional[List[List[pyinterp.geodetic.Point]]] = None)[source]#

Bases: pyinterp.core.geodetic.Polygon

The polygon contains an outer ring and zero or more inner rings. :param outer: outer ring. :param inners: list of inner rings.

Raises

Attributes

inners

The inner rings.

outer

The outer ring.

Inherited Methods

area(self[, wgs])

Calculates the area.

covered_by(*args, **kwargs)

Overloaded function.

distance(*args, **kwargs)

Overloaded function.

envelope(self)

Calculates the envelope of this polygon.

from_geojson(array)

Creates a polygon from a GeoJSON coordinates array.

intersection(self, other)

Computes the intersection of this polygon with another.

intersects(self, other)

Checks if this polygon intersects another.

num_interior_rings(self)

Returns the number of the interior rings.

read_wkt(wkt)

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

to_geojson(self)

Return the polygon as a GeoJSON type.

touches(self, other)

Checks if this polygon touches another.

union(self, other)

Computes the union of this polygon with another.

wkt(self)

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