Search code examples
rpixelresolutionraster

How to set the factor in disaggregate function


I have a question regarding the aggregation of rasters/pixels. I have a rasterstack with spatial resolution of 25km x 25km and I want to change it to 500m x 500m and preserve its values. I believe that I must use the disaggregate function but I do not understand from the help page how to set the factor.


Solution

  • You want to go from 25 km to 500 m resolution. In that case, the factor is 25000 / 500 = 50

    If you want to change the resolution with a factor that is not an integer, you can use resample instead.