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])

boundary([pts_per_side])

Points along the perimeter as a linear ring.

buffered(xbuff[, ybuff])

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

count(value)

explore([map, tiles, attr, map_kwds])

Plot BoundingBox on an interactive folium leaflet map for rapid data exploration.

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.

map_bounds()

Convert to bounds in folium/ipyleaflet style.

qr2sample(n[, padding, with_edges, offset])

Generate quasi-random sample of points within this boundingbox.

round()

Expand bounding box to nearest integer on all sides.

to_crs(crs, **kw)

Compute bounding box in other CRS.

transform(transform)

Map bounding box through a linear transform.

Attributes

aoi

Interop with pyproj.

aspect

Aspect ratio.

bbox

bottom

crs

height

int(span_y)

left

points

Extract four corners of the bounding box.

polygon

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)