datacube.utils.geometry.BoundingBox#

namedtuple datacube.utils.geometry.BoundingBox(left: float, bottom: float, right: float, top: float)[source]#

Bounding box, defining extent in cartesian coordinates.

Fields:
  1.  left (float) – Alias for field number 0

  2.  bottom (float) – Alias for field number 1

  3.  right (float) – Alias for field number 2

  4.  top (float) – Alias for field number 3

buffered(ybuff, xbuff)[source]#

Return a new BoundingBox, buffered in the x and y dimensions.

Parameters:
  • ybuff (float) – Y dimension buffering amount

  • xbuff (float) – X dimension buffering amount

Return type:

BoundingBox

Returns:

new BoundingBox

count(value, /)#

Return number of occurrences of value.

static from_points(p1, p2)[source]#

BoundingBox from 2 points

Parameters:
Return type:

BoundingBox

static from_xy(x, y)[source]#

BoundingBox from x and y ranges

Parameters:
Return type:

BoundingBox

index(value, start=0, stop=9223372036854775807, /)#

Return first index of value.

Raises ValueError if the value is not present.

property points: list[tuple[float, float]]#

Extract four corners of the bounding box

transform(transform)[source]#

Transform bounding box through a linear transform

Apply linear transform on 4 points of the bounding box and compute bounding box of these four points.

Return type:

BoundingBox