locan.data.hulls.hull.OrientedBoundingBox#

class locan.data.hulls.hull.OrientedBoundingBox(points)[source]#

Bases: object

Class with oriented bounding box computed using the shapely minimum_rotated_rectangle method.

Parameters:

points (npt.ArrayLike) – Coordinates of input points with shape (npoints, ndim).

Variables:
  • hull (Polygon) – Polygon object from the minimum_rotated_rectangle method

  • dimension (int) – Spatial dimension of hull

  • vertices (npt.NDArray[np.float64]) – Coordinates of points that make up the hull. Array of shape (ndim, 2).

  • width (npt.NDArray[np.float64]) – Array with lengths of box edges.

  • region_measure (float) – hull measure, i.e. area or volume

  • subregion_measure (float) – measure of the sub-dimensional region, i.e. circumference or surface

  • region (Region) – Convert the hull to a Region object.

  • angle (float) – Orientation defined as angle (in degrees) between the vector from first to last point and x-axis.

Methods

__init__(points)

Attributes

property region: Rectangle#
property vertices: ndarray[Any, dtype[float64]]#