hydromt.data_catalog.sources.RasterDatasetSource.get_bbox#

RasterDatasetSource.get_bbox(crs: CRS | None = None, detect: bool = True) Tuple[float, float, float, float], <function _validate_bbox at 0x7f531a056020>], int][source]#

Return the bounding box and espg code of the dataset.

if the bounding box is not set and detect is True, hydromt.RasterdatasetAdapter.detect_bbox() will be used to detect it.

Parameters:

detect (bool, Optional) – whether to detect the bounding box if it is not set. If False, and it’s not set None will be returned.

Returns:

  • bbox (Tuple[np.float64,np.float64,np.float64,np.float64]) – the bounding box coordinates of the data. coordinates are returned as [xmin,ymin,xmax,ymax]

  • crs (int) – The ESPG code of the CRS of the coordinates returned in bbox