I have a NDVI image from MODIS product. Detailed information of this raster file is shown in the picture below.
I wanted to convert NoData (-3.4028234663e+038) value into 0 and keep other values unchanged. Then I used Con and IsNull statements on raster calculator. But it didn't work, the NoData value of output image is still the same with before it was. Here is the calculation: Con(IsNull("NDVI.tif"), 0, "NDVI.tif").
I used other ways to change NoData to 0 ie exporting the original raster file, using Set Null tool, changing data type. None of them worked.
Is there any other way to replace NoData values with 0?
Thank you so much for all comments in advance.
Solved! Go to Solution.
or run the IsNull tool and if your output raster has any 0s it means that you have NoData.
is 0 a valid class? are there any nodata cells in the inputs? examine its histogram
or run the IsNull tool and if your output raster has any 0s it means that you have NoData.
The value in the properties is just the code used in that raster dataset for NoData cells (if any exist).
Because it is listed there does not mean you necessarily have any NoData cells.
I had the same experience, using the conditional function (Con(IsNull("NDVI.tif"), 0, "NDVI.tif"), doesn't help if there are no NoData values in your raster (which can be checked several ways). The problem here is simply the way NoData is defined in the raster properties of the file. If it is defined as '-3.4028234663e+038' this can indeed give execution problems in several operations further down the line (I suppose because this NoData value is read from the raster properties and used someway, somehow. However, an easy solution to this all is exporting your raster (right click -> Data / Export Data) and change the value of the field 'NoData as' to another value.
If [NoData] is defined as '-3.4028234663e+038' this can indeed give execution problems in several operations further down the line
Depending on your workflow and the raster formats you are using the defaults sometimes don't do what you need, so: