I have two binary rasters showing habitat suitability (0 = unsuitable, 1 = suitable) under current and future climate scenarios. I am trying to create a raster showing:
0 = cells that are not suitable under either scenario (i.e. = 0 in both rasters) 1 = cells suitable under current (=1) but NOT future (=0) 2 = cells suitable under both scenarios (i.e. both = 1) 3 = cells suitable under future (=1) but not current (=0)
So the final raster will consist of values of 0 , 1 , 2, 3, 4 (and no data = -9999)
I am struggling with the correct syntax in raster calculator. Is it possible to do this all in one line of syntax or do I have to create four separate rasters?
To summarise my files:
I have a current binary raster (Model10a_bin.tif) and a future binary raster (Model10a_yr2050_bin.tif) and I am trying to create a new raster showing the following:
If Model10a_bin.tif = 0 and Model10a_yr2050_bin.tif = 0 ; Value new raster = 0
If Model10a_bin.tif = 1 and Model10a_yr2050_bin.tif = 0 ; Value new raster = 1
If Model10a_bin.tif = 1 and Model10a_yr2050_bin.tif = 1 ; Value new raster = 2
If Model10a_bin.tif = 0 and Model10a_yr2050_bin.tif = 1 ; Value new raster = 3