Skip to content
Permalink
Browse files

Fix incorrect data type for GDAL layers with gain/offset (fix #11573)

Test was incorrectly checking for both offset and gain, when it
should have been testing for either.
  • Loading branch information
nyalldawson committed Mar 6, 2015
1 parent 47d04db commit 326b4989f0b00254601dbb6ef8182f571b58a2d3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/gdal/qgsgdalprovider.cpp
@@ -2650,9 +2650,9 @@ void QgsGdalProvider::initBaseDataset()
// define if the band has scale and offset to apply
double myScale = bandScale( i );
double myOffset = bandOffset( i );
if ( myScale != 1.0 && myOffset != 0.0 )
if ( !qgsDoubleNear( myScale, 1.0 ) || !qgsDoubleNear( myOffset, 0.0 ) )
{
// if the band has scale and offset to apply change dataType
// if the band has scale or offset to apply change dataType
switch ( myGdalDataType )
{
case GDT_Unknown:

0 comments on commit 326b498

Please sign in to comment.
You can’t perform that action at this time.