3

I have a project that contains an 8-bit paletted layer (call it the mask layer) and a float 32 single band layer (call this the clip layer). I create a new raster by using the raster calculator, defining the extent to match the clip layer, and the value is defined as

(mask@1 >= 0) * clip@1

The resulting raster, when viewed with gdalinfo, has a NoData value of -3.4028234... e+038. Yet the input clip layer has no NoData value. Where is QGIS getting this NoData value from?

2
  • Have you noticed that -3.4028234...e+38 (which is a base-10 representation of (2 - 2^(-23))*2^127 up to 24 bits of precision) would be represented as the 32-bit binary value 11111111111111111111111111111111B in single-precision floating point format?
    – whuber
    Commented Feb 24, 2014 at 17:38
  • I assumed it was the min value for the datatype, though I didn't look it up. So I guess that's sort of a "yes" :-)
    – Llaves
    Commented Feb 24, 2014 at 19:26

1 Answer 1

4

This is the default NoData value for QGIS. It is the smallest possible value for a signed 32-bit float data type (I think you meant to type a minus in front of the value you quoted). You need not worry about a NoData value appearing especially if non of your data is NoData. QGIS won't suddenly allocate some data cells as NoData. It is just part of the definition of the raster - you can always change it if you want some other value, though since you don't have any NoData, it is a bit irrelevant.

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.