upscale | R Documentation |
upscale an input raster to an output grid using an area preserving method
upscale(input, cellsize, no_data = NA, nthread = NULL, verbose = FALSE)
input |
(SpatRaster) a terra raster with fine resolution |
cellsize |
(numeric) cell resolution in units of input CRS of output target grid. The value should be always larger than input resolution. |
no_data |
(integer) a value to be treated as NO_DATA. Default to NA. |
nthread |
(integer) the number of thread to use for parallel. If |
verbose |
(logical) option to print out info for debugging. |
(SpatRaster) a resampled terra raster
library(APUpscale) library(terra) nlcd <- rast(system.file('extdata/nlcd_dukes.tif', package = "APUpscale")) lc_coarse <- upscale(nlcd, cellsize = 1000, nthread = 2) coltab(lc_coarse) <- coltab(nlcd) plot(lc_coarse)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.