-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Int images with floating point gain not displayed properly #19835
Comments
Author Name: Giovanni Manghi (@gioman) please attach/link sample data.
|
Author Name: Matthew Hanson (Matthew Hanson) Link to example data. TIF NDVI image. Int16, ranging from -26512 to 11716 with a gain of 0.0001: QGIS 2.2 reports numbers as the original ints, and is correct (although without gain) in the above range. QGIS 2.4, 2.6 reports numbers statistics properly as -2.6512 to 1.1716, but the image is displayed as all 0's. With the gain removed 2.6 behaves as 2.2. Same image, with no gain set: |
Author Name: Matthew Hanson (Matthew Hanson) I would like to request that the "feature" of applying Gain and Offset be reverted until this bug is fix. As it stands QGIS is completely unusable if you store floating point images as Int16 to save space (a very common thing to do for storing indices such as NDVI). We have had to peg our QGIS at 2.2. |
Author Name: Giovanni Manghi (@gioman) Matthew Hanson wrote:
I'm not sure I completely understand the issue, anyway I suggest you to raise the problem in the developers mailing list, where there is a much larger "audience". |
Author Name: Nyall Dawson (@nyalldawson) Fixed in changeset "914ecc9c0980012b27b15ce5616cf5541da66f55".
|
Author Name: Matthew Hanson (Matthew Hanson)
Original Redmine Issue: 11573
Affected QGIS version: 2.6.0
Redmine category:rasters
In 2.4 a new feature was introduced that was to apply the gain and offset, if there was one, to the read and displayed image.
However QGIS appears to honor the original data type of the image after the gain and offset are applied.
To reproduce:
Take an Int typed image with a floating point gain. For example, an NDVI image stored as Int16 might have a gain of 0.001 to yield values generally in the range of -1.0 to 1.0.
Open in QGIS. The image will appear black/white/gray.
Examine with Identify Feature. Image is made up of only -1's, 0's and 1's (depending on individual image), as if the gain was applied but the data type was still integer
Note that the statistics generated are properly in floating point. However the display, and the pixels as reported by Identify Feature, are ints.
This bug is present in 2.4 and 2.6. Verified on multiple Ubuntu desktop and server machines, both 12.04 and 14.04.
The text was updated successfully, but these errors were encountered: