odc.geo.geom.BoundingBox

class odc.geo.geom.BoundingBox(left, bottom, right, top, crs=None)[source]

Bounding box, defining extent in cartesian coordinates.

__init__(left, bottom, right, top, crs=None)[source]

Methods

__init__(left, bottom, right, top[, crs])

buffered(xbuff[, ybuff])

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

count(value)

from_points(p1, p2[, crs])

Construct BoundingBox from two points.

from_transform(shape, transform[, crs])

Construct BoundingBox from image shape and transform.

from_xy(x, y[, crs])

Construct BoundingBox from x and y ranges.

index(value, [start, [stop]])

Raises ValueError if the value is not present.

transform(transform)

Map bounding box through a linear transform.

Attributes

bbox

rtype

Tuple[float, float, float, float]

bottom

crs

rtype

Optional[CRS]

height

int(span_y)

left

points

Extract four corners of the bounding box.

polygon

rtype

Geometry

range_x

left, right

range_y

bottom, top

right

shape

(int(span_y), int(span_x)).

span_x

Span of the bounding box along x axis.

span_y

Span of the bounding box along y axis.

top

width

int(span_x)