I am trying to use the Raster Calculator to multiply 2 rasters together. They were created by using the raster calculator to keep values exceeding a threshold in two other rasters. I have tried numerous combinations but always end up with zeros everywhere.
I have 2 rasters A1 and B1 of the same area. I want to locate areas where A1 > 5 and 30 <= B1 <= 45.
I could not figure out how to use AND or OR commands in the Raster Calculator (the RasterCalc plugin suggested elsewhere doesn't appear to still be available).
I created two new rasters A2 and B2, using the commands
("A1" > 5) {saved as A2}
("B1" <=45 )* "B1" {saved as B2a}
(B2a >= 35) {saved as B2}
I now have 2 rasters that are 0,1 values (or rather 0.999000). I want to multiply these together. I have tried wrapping them in float(), or using float with the above commands to see if that made a difference (it didn't).
If I look at the rasters/use the inspection tool I can see that there are regions where both A2 and B2 are 1 - yet any multiplication gives only 0 as the output, any addition gives only 0 or 1.
I have not been able to find any reason as to why this might be happening.
If I simply multiply the two original rasters A1 and B1 this works as expected, so it does not appear to be multiplication that is the problem.