I have two binary rasters, raster1 and raster2, which represent the distribution of grassland habitats inside an area in two different moments in time (raster1 = older, raster2 = recent). In both rasters, grassland areas have the value 255, while everything else has the No data value of 0. The two rasters have the same extent and the cell centers line up.
I would like to do a simple change detection operation and create a new raster whose values are something like:
if raster1 and raster2 = 255 --> assign 255 to new raster (or any other value, i simply want it to represent "no change and remained grassland"
if raster1 and raster2 = 0 --> 0 (no change and remained not grassland)
if raster1 = 0 and raster2 = 255 --> 100 (changed and became grassland from no grassland)
if raster1 = 255 and raster2 = 0 --> 200 (changed and became not grassland from grassland)
Anyone can suggest a way to do this in QGis? (that doesn't require much knowledge in writing codes, if possible)