hydromt.DataArray.raster.clip_bbox#

DataArray.raster.clip_bbox(bbox, align=None, buffer=0, crs=None)#

Clip object based on a bounding box.

Parameters:
  • bbox (array-like of floats) – (xmin, ymin, xmax, ymax) bounding box

  • align (float, optional) – Resolution to align the bounding box, by default None

  • buffer (int, optional) – Buffer around the bounding box expressed in resolution multiplicity, by default 0

  • crs (CRS, int, str, optional) – crs of bbox

Returns:

Data clipped to bbox

Return type:

xarray.DataSet or DataArray