[GIS] Wrong Min and Max Pixel values

pixelqgis

I want to convert a raster .tif file into a raster .asc file in QGIS. For this, I am selecting Raster -> Conversion -> Translate option. I am getting the output .asc file.

But, both the minimum and maximum pixel values of this raster file is displayed as 1.79769e+308 and I am not able to see any data in this output file.

It is true that there is no data available in this raster file. But, even in that case, the minimum and maximum pixel values will not be like this.

Unfortuantely, I am getting very crazy pixel values : Min = 1.79769e+308 and Max = 1.79769e+308.

Whenever I do any type of geoprocessing in QGIS with a raster which has no data / feature, I am getting the pixel values as Min = 1.79769e+308 and Max = 1.79769e+308.

What is the exact reason for this issue and how can I solve this ?

Best Answer

Another possibility is that you are working on renamed layers. When I did raster calculations I often got faulty layers (1.79769e+308 values) generated in QGIS 3x, without any error. I tested on QGIS 3.2 and 3.4.3.

There is a raster calculator bug caused by renaming of layers that only was completely fixed on 2019-01-02. See issue 20601, it is fixed, but has yet to make it to a stable build. As a workaround, in 3.4.3, the Gdal raster calculator in the Processing Toolbox seems to work, as is the one in the main menu "Raster - Raster Calculator"

Related Question