xrspatial.zonal.trim

xrspatial.zonal.trim(raster: xarray.core.dataarray.DataArray, values: Union[list, tuple] = (nan), name: str = 'trim')xarray.core.dataarray.DataArray[source]

Trim scans from the edges and eliminates rows / cols which only contain the values supplied.

raster: xarray.DataArray values: list, tuple (default = (np.nan))

list of zone ids to trim from raster edge

name: str (default = ‘trim’)

output xr.DataArray.name property

xarray.DataArray

This operation will change the output size of the raster