xrspatial.zonal.crop(zones: xarray.core.dataarray.DataArray, values: xarray.core.dataarray.DataArray, zones_ids: Union[list, tuple], name: str = 'crop')[source]

Crop scans from edges and eliminates rows / cols until one of the input values is found.


input zone raster

values: xarray.DataArray

input values raster

zones_idslist, tuple

list of zone ids to crop raster

name: str (default = ‘crop’)

output xr.DataArray.name property


This operation will change the output size of the raster