raster (version 2.1-41)

disaggregate: Disaggregate

Description

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 resample function).

Usage

## S3 method for class 'Raster':
disaggregate(x, fact=NULL, method='', filename='', ...)

Arguments

x
a Raster object
fact
integer. amount of disaggregation expressed as number of cells (horizontally and vertically). This 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.
method
Character. '' or 'bilinear'. If 'bilinear', values are locally interpolated (using the resample function
filename
Character. Output filename (optional)
...
Additional arguments as for writeRaster

Value

  • Raster object

See Also

aggregate

Examples

Run this code
r <- raster(ncols=10, nrows=10)
rd <- disaggregate(r, fact=c(10, 2))
ncol(rd)
nrow(rd)
r[] <- 1:ncell(r)
rd <- disaggregate(r, fact=c(4, 2), method='bilinear')

Run the code above in your browser using DataLab