Search code examples
rrasterspatialresolutionr-raster

Disaggregate / increase raster resolution and distribute initial cell values to new cells through division


Is there a way to increase the resolution of a raster for example from 0.5 degree to 0.25 degree with the values from the 0.5 degree cells being distributed into the new 0.25 degree cells? For example, if a 0.5 degree cell has a value of 8, the four 0.25 degree cell get a value of 2 (8/4)? Thanks a lot for your help!

r <- raster(ncol=2, nrow=2)
r[] <- 8
r2 <- disaggregate(r, fact=2)

Solution

  • You can divide by 4, as follows

    library(raster)
    r <- raster(ncol=2, nrow=2, vals=8)
    r2 <- disaggregate(r, fact=2) / 4