I am using 'Clip raster by mask layer' in QGIS to clip a raster temperature layer down to the size of the area I'm interested in using a polygon. The resulting clipped layer is a raster that has pixel values significantly different from the original.
I am doing this same process with different raster layers and it usually works fine, but some clipped layers come out with pixel values totally off. This is not an issue of values display. It's just that the pixels have different values. For example, when I right-click with 'identifier features' option on a random pixel it gives me values of 26.95 in the original (which makes complete sense as this is the value of mean annual temperature) and a value of 3001 in the clipped raster.
Does anyone know what's going wrong?
I couldn't attach the image in my previous comment. Here it is:
65536/2844=23.04
and256/11=23.27
. Thus about the same proportion of the full scale. You may have changed the datatype. Another option is that the original image is of higher bit depth but it has scale and offset stored into the image metadata and QGIS know to make the conversion into temperature units. I do not know if it can do that. You should add gdalinfo reports about your images.-unscale
in gdal.org/programs/gdal_translate.html and experiment.