hydromt.DataArray.raster.clip_geom#
- DataArray.raster.clip_geom(geom, align=None, buffer=0, mask=False)#
Clip object to the bounding box of the geometry and add geometry ‘mask’ coordinate.
- Parameters:
geom (geopandas.GeoDataFrame/Series,) – A geometry defining the area of interest.
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
mask (bool, optional) – Mask values outside geometry with the raster nodata value
- Returns:
Data clipped to geometry
- Return type:
xarray.DataSet or DataArray