rasterio.coords module

Bounding box tuple, and disjoint operator.

class rasterio.coords.BoundingBox(left, bottom, right, top)

Bases: tuple

Bounding box named tuple, defining extent in cartesian coordinates.

BoundingBox(left, bottom, right, top)
bottom

Bottom coordinate

left

Left coordinate

right

Right coordinate

top

Top coordinate

rasterio.coords.disjoint_bounds(bounds1, bounds2)

Compare two bounds and determine if they are disjoint.

Parameters:
  • bounds1 (4-tuple) – rasterio bounds tuple (left, bottom, right, top)

  • bounds2 (4-tuple) – rasterio bounds tuple

Returns:

  • boolean

  • True if bounds are disjoint,

  • False if bounds overlap