I have a raster with depths (ESRI ASCII DEM format, named "combined_smooth") from "-5" to "6" (positive values are depths, negative land heights). I want to increase the depth by 2.17 m, and have written the following expression for the raster calculator:

("combined_smooth@1" >= 0) * (2.17+"combined_smooth@1")+("combined_smooth@1" < 0)*-5

This correctly adds "2.17" to the depths, but also makes the smallest vales in the raster (a height) equal to "-3.40282e+38". Running a second round of the calculator as:

("combined_smooth@1"<-5)*-5 + ("combined_smooth@1">=-5)*"combined_smooth@1"

yields an identical raster, who's minimal value is still "-3.40282e+38". I assume this is some sort of NODATA_VALUE, but opening the file in shows NODATA_Value as -9999 and a search in the file find no values like "-3.40282e+38".

  • 2
    "-3.40282e+38" is negative float-max (minimum representation limit of 4-byte IEEE floating-point value)
    – Vince
    Jun 29, 2022 at 15:47
  • Yes I figured as much, but still strange that the expression: "aRaster<-5" does not pick that up, surely "-3.40282e+38" is smaller than "-5". So QGIS must give this number a separate attribute such as "low(float)" or something similar... Grrrr....
    – Rasmus
    Jun 30, 2022 at 8:18

1 Answer 1


Using the method provided here to find and change all values to a chosen value, makes the above expression work.


  1. Turn off tick in layer properties/No data value
  2. use Processing/GRASS/r.null to replace "-3.40282e+38" with other value
  3. Use raster calculator succesfully

Solution to eliminate "-3.40282e+38" from raster: Changing nodata pixels of -3.40282347e+38 to a different number in QGIS

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.