pyinterp.core.geodetic.Box

class pyinterp.core.geodetic.Box(self, min_corner: Point, max_corner: Point)

Bases: pybind11_object

Defines a box made of two describing points.

Parameters:
  • min_corner – the minimum corner point (lower left) of the box.

  • max_corner – the maximum corner point (upper right) of the box.

Attributes

max_corner

The maximal corner (upper right) of the box.

min_corner

The minimal corner (lower left) of the box.

Public Methods

area(self[, wgs])

Calculates the area.

as_polygon(self)

Returns the box as a polygon.

centroid(self)

Computes the centroid of the box.

covered_by(*args, **kwargs)

Overloaded function.

distance(*args, **kwargs)

Overloaded function.

from_geojson(array)

Creates a box from a GeoJSON coordinates array.

read_wkt(wkt)

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

to_geojson(self)

Return the box as a GeoJSON type.

whole_earth()

Returns the box covering the whole earth.

wkt(self)

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

Protected Methods

Special Methods

__copy__(self)

Implements the shallow copy operation.

__eq__(self, other)

Overrides the default behavior of the == operator.

__getstate__(self)

__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 box.

__setstate__(self, arg0)