hydromt.gis.DataArray.raster.clip_geom#
- gis.DataArray.raster.clip_geom(geom, align=None, buffer=0, mask=False)#
Clip object to bounding box of the geometry.
- Parameters:
geom (
geopandas.GeoDataFrame/Series,
) – A geometry defining the area of interest.align (
float
, optional) – Resolution to align the bounding box, by default Nonebuffer (
int
, optional) – Buffer around the bounding box expressed in resolution multiplicity, by default 0mask (
bool
, optional) – Mask values outside geometry with the raster nodata value, and add a “mask” coordinate with the rasterize geometry mask.
- Returns:
Data clipped to geometry
- Return type:
xarray.DataSet
orDataArray