trim_na.Rd
The trim function from the terra package only remove cols and rows full of NA. This function remove all cols and rows with NA on the periphery. Useful to get a nicely formatted raster grid after reprojection.
trim_na(rast, verbose = F)
rast | input raster (SpatRaster) |
---|---|
verbose | flag (default FALSE) to switch |
a trimmed raster (SpatRaster)