I have two rasters for same spatial extent and need to compare both rasters cell by cell and produce one output raster. Each has 10 land cover classes. Based on those 10 classes the comparison should be 100 conditional statements.
Here I wrote two statements and did a test run. It gives me only a output based on the last conditional statement. Which is output raster has cell values only 21.
outCon = Con (((inRaster1 == 11) & (inRaster2 == 11)), inRaster1 + inRaster2, 11)
outCon = Con (((inRaster1 == 21) & (inRaster2 == 11)), inRaster1 + inRaster2, 21)
outCon.save ("G:\\LC_Transitions\\con_test")
Any suggestions on what I did wrong in here?
Also, if I want to run a statement for multiple conditions together (for ex: If (InRaster = 21, 22, 23, 24) and (inRaster2 = 11) - return 11) could anyone suggest the correct syntax for this kind of multiple conditions.