3

I have a number of 32-bit-float single-band GeoTIFFs where about 30% of the values are NaN. I have confirmed the presence of these NaN values by reading the GeoTIFFs using GDAL and libTIFF. However, when I open these GeoTIFFs in QGIS as raster height layers, all the NaN values are somehow replaced with what appears to be valid ground heights.

Why is QGIS doing this and is there a way to force QGIS to load the raw values from a GeoTIFF?

3
  • 1
    What does gdalinfo say about the NODATA value? What does QGIS return if you retrieve the pixel value at such location? What does QGIS say about NODATA? Commented Jun 7, 2017 at 8:25
  • gdalinfo does not report NODATA - I presume the GeoTIFF does not set it?
    – Jason L
    Commented Jun 7, 2017 at 9:16
  • gdalinfo does not report NODATA - I presume the GeoTIFF has not set it. In that case, is there any way to tell QGIS to just show a blank cell for pixels which are NaN?
    – Jason L
    Commented Jun 7, 2017 at 9:29

1 Answer 1

3

There is a manual, read https://docs.qgis.org/2.18/en/docs/user_manual/working_with_raster/raster_properties.html#transparency-properties, find "Additional no data value".

enter image description here

Alternatively you can fix the source image with gdal_edit.py http://www.gdal.org/gdal_edit.html.

-a_nodata value:

Assign a specified nodata value to output bands.

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.