I have a two bands raster. I need to reclassify it following the rules "if band 1 = x and band 2 = y the new value will be 1", "if band 1 = a and band 2 = b the new value will be 2", ecc... How can I do this?

1 Answer 1


For example use Raster Calculator:

When a condition is true, it evaluates to 1, so

when ("Virtual@1"=500) is true and ("Virtual@2"=200) means 1*1*1=1, and add more conditions with +

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.