[Qgis-developer] Bug with floating point gains

Matthew Hanson mhanson at appliedgeosolutions.com
Wed Mar 4 08:17:37 PST 2015


Hello,

I filed a bug report on this some weeks ago:
http://hub.qgis.org/issues/11573

But it hasn't gotten the required attention.    It's a rather egregious
bug, which currently is restricting us to QGIS v2.2, which is becoming more
of a problem the more outdated it gets.

In short, when using a floating point gain with integer images the datatype
is not promoted, so you end up with an image that is rounded to the nearest
integer.  It's fairly common practice to store indices, like NDVI, as an
Int16 with a gain of 0.0001 as it is half the space. But in QGIS, these
images end up being rounded to mostly 0.

The feature of auto-applying the gain is nice in practice, but without
promoting the data type of the output it is counter-productive.   It would
be good to either revert this feature or properly promote the datatype.

I'd be happy to do more digging and try fixing this and issue a PR if
someone could get me started by pointing me in the general direction of the
code responsible for this.

Thanks,


Matthew Hanson
Applied GeoSolutions
(603) 659-3363 x91
http://appliedgeosolutions.com
mhanson at appliedgeosolutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150304/f7a9576f/attachment-0001.html>


More information about the Qgis-developer mailing list