I have a lot of cells in a raster layer (GeoTIFF) with a -9999 value in it. I would like to update that values to 0.

I mean, in vectorial layers would be something like: CASE WHEN band1=-9999 THEN 0 ELSE band1 END

Is this possible to do for raster layers in QGIS or any other GIS software?

  • I am not sure but do you need something like reclass? eg. in grass gis you can reclass like: -9999 = 0 , * = *. The * = * means that the other values remain same as before.
    – geo_dd
    Mar 2, 2015 at 13:57

1 Answer 1


I finally made it using the following expression y QGIS Raster Calculator:

("rasterlayer" != -9999) * "rasterlayer"


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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