pyflwdir.FlwdirRaster.basin_bounds#

FlwdirRaster.basin_bounds(basins: ndarray | None = None, **kwargs) → tuple[ndarray, ndarray, ndarray][source]#

Return the bounding boxes of basins.

If basins is omitted, additional keyword arguments are passed to basins() to create the basin map.

Parameters:
  • basins (2D array of uint32, optional) – Raster of basin IDs. Calculated on the fly if omitted.

  • **kwargs (dict) – Additional keyword arguments passed to basins() when basins is omitted.

Returns:

  • lbs (1D array of int) – Basin IDs.

  • bboxs (2D array of float) – Bounding boxes with columns [xmin, ymin, xmax, ymax].

  • total_bbox (1D array of float) – Bounding box enclosing all basins, [xmin, ymin, xmax, ymax].