1

I have a little question for Change No Data Value Geotiff File with Qgis or Gdal by another value. Usually one imports or exports a file with no data value -9999, but sometimes we need to change that number for another on raster calculator the expression != but it seems not to work with No data value any idea


Nice discussion, Carlos but at same Kurt this option is for a range of data. I was user syntax band math of ENVI and I thought to apply something like this on Raster Calculator

( "MCD10A1_2018266@1" != -9999) * -8888 AND  ( "MCD10A1_2018266@1" >=  0 )  * "MCD10A1_2018266@1"

But I do not understand does not work!!

1

Another possibility

You could to use this tool Menu >> Raster >> Conversion >> Translate (convert format)

And assign the new value to no-data values,

enter image description here

|improve this answer|||||
  • does also not work for me: a "no data" value cant be set to a valid value e.g. 0 or 100 or whatever – Kurt Oct 9 '18 at 16:25
1

To change No Data values of a raster to something else, like 0 or 1 or whatever, you can use the GRASS tool r.null.

enter image description here

|improve this answer|||||
0

when you export the raster, context menu

"Export --> Export Raster Layer As..."

You could to change the no data value, see the picture

From -99999 To -88888 (per example)

enter image description here

|improve this answer|||||
  • did NOT work for me, when you have "no data" instead of say -9999 – Kurt Oct 8 '18 at 17:44
  • replace -99999 for the value that your raster use to "No data value" – Carlos López Quintanilla Oct 8 '18 at 17:50
  • 1
    See the Layer properties (your raster) >> Information >> Bands >> No-Data – Carlos López Quintanilla Oct 8 '18 at 17:52
  • 1
    ah , Layer properties (your raster) >> Information >> Bands >> No-Data shows which value is used for no data, thx – Kurt Oct 8 '18 at 18:12
  • 1
    Is there a way to recode a "no data"-value to a valid value, e.g. 0 ? – Kurt Oct 8 '18 at 18:15

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.