Reclass raster stack based on condition and other layers

المشرف العام

Administrator
طاقم الإدارة
I want to reclassify raster r1 in the following form:

  • all the values that are larger than r2 to be 1
  • all the values that are less than r3 to be 0
  • all the rest of the values to be equal to r4
I use overlay to set the values for the first two conditions, but I can't do that for the third one. I am also interested to know how to put all these in one function. Thanks!

library(raster)r1
 
أعلى