Disaggregate a RasterLayer to create a new RasterLayer with a higher resolution (smaller cells). The values in the new RasterLayer are the same as in the larger original cells unless you specify
method="bilinear", in which case values are locally interpolated (using the
disaggregate(x, fact, ...)
- a RasterLayer object
- degree of aggregation or disaggregation expressed as number of cells (horizontally and vertically). See details
- additional arguments. See Details.
Fact can be a single integer or two integers c(x,y), in which case the first one is the horizontal disaggregation factor and y the vertical disaggreation factor.
If a single integer values is supplied, cells are disaggregated with the same factor in x and y direction.
If no filename is specified, and the resulting RasterLayer is too large to hold in memory, it is saved to a temporary file.
The following additional arguments can be passed, to replace default values for this function
filename Filename for the output RasterLayer
format Character. Output file type. See
TRUE, "filename" will be overwritten if it exists
progress Character. Valid values are "text", "tcltk", "windows" (on that platform only) and ""
- A new RasterLayer object, and in some cases the side effect of a new file on disk.
r <- raster(ncols=10, nrows=10) rd <- disaggregate(r, fact=c(10, 5)) ncol(rd) nrow(rd) r <- 1:ncell(r) rd <- disaggregate(r, fact=c(10, 5), method='bilinear')