2

I found out that for a raster in float32 Identify Features tool reports rounded values. For example on the screenshot it reports that the pixel value is -0.3, although the real value is -0.300000011920929 (and I can see the real value using "Layer properties/Transparency/Add values from display" ). How to disable rounding in Identify Features tool? I'm using QGIS 2.18.12 Rounded pixel value Real pixel value

1

the extra digits at the end are a bit confusing; these are due to something called single-precision floating point. As opposed to Arbitrary precision. The 'real' value is -0.3

This is a limitation of how floating point numbers are stored in a fixed-sized binary format (float 32 in your case); it's not unique to QGIS.

This page shows what's happening, if you're curious.

e.g. in python

>> import numpy as np
>> print(np.float32(-0.3))
-0.30000001

so it looks as if the problem is the other way around, perhaps the display of the transparency dialog could be changed to be more like the identify tool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.