0

I would like to use raster calculator in QGIS to convert all values <= -500 to NA values. How can I do that?

0

Well, there is a trick for using if/else in calculator. It can be used for your question. Type following code into raster calculation expression:

("gurbeyli@1"<=-500)*-9999 + ("gurbeyli@1">-500)*"gurbeyli@1"

And of course "gurbeyli@1" is my raster band name, you should use yours. In this example, -9999 was used as NA value: 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.