0

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.

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
geo_dd
  • 283
  • 1
  • 5
  • 22
  • 1
    It is, I believe, well explained on this link: https://stackoverflow.com/questions/32278825/how-to-change-the-resolution-of-a-raster-layer-in-r – Lokinou Mar 04 '19 at 09:31
  • 1
    Possible duplicate of [How to change the resolution of a raster layer in R](https://stackoverflow.com/questions/32278825/how-to-change-the-resolution-of-a-raster-layer-in-r) – divibisan Mar 04 '19 at 18:39

1 Answers1

1

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.

Robert Hijmans
  • 40,301
  • 4
  • 55
  • 63
  • Thank you all for your comments. The suggested similar question by Lokinou and divibisan does not make clear what happens in cases where the factor is a decimal number. E.g. if someone wants to change from 250m x 250m to 550m x 550m should he/she set the factor to 2, 3 or 2.2? Thanks. – geo_dd Mar 05 '19 at 07:52
  • In that case you can use `resample` – Robert Hijmans Mar 05 '19 at 11:26