bento.tl.bounds

bento.tl.bounds(sdata, shape_key, recompute=False)

Compute the minimum and maximum coordinate values that bound each shape.

Parameters:
  • sdata (SpatialData) – Spatial formatted SpatialData

  • shape_key (str) – Key in sdata.shapes[shape_key] that contains the shape information.

Returns:

.shapes[shape_key][‘{shape}_minx’]float

x-axis lower bound of each polygon

.shapes[shape_key][‘{shape}_miny’]float

y-axis lower bound of each polygon

.shapes[shape_key][‘{shape}_maxx’]float

x-axis upper bound of each polygon

.shapes[shape_key][‘{shape}_maxy’]float

y-axis upper bound of each polygon