pyinterp.core.geodetic.Box¶
- class pyinterp.core.geodetic.Box(self, min_corner: Point, max_corner: Point)¶
Bases:
pybind11_objectDefine a box made of two corner 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
The maximal corner (upper right) of the box.
The minimal corner (lower left) of the box.
Public Methods
area(self[, wgs])Calculates the area.
as_polygon(self)Return 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.
Return the box covering the whole earth.
wkt(self)Get the OGC Well-Known Text (WKT) representation of this instance.
Special Methods
__copy__(self)Implement the shallow copy operation.
__eq__(self, other)Override the default behavior of the
==operator.__getstate__(self, /)__ne__(self, other)Override the default behavior of the
!=operator.__repr__(self)Return the string representation of this box.
__setstate__(self, arg0)