We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47d04db commit 326b498Copy full SHA for 326b498
src/providers/gdal/qgsgdalprovider.cpp
@@ -2650,9 +2650,9 @@ void QgsGdalProvider::initBaseDataset()
2650
// define if the band has scale and offset to apply
2651
double myScale = bandScale( i );
2652
double myOffset = bandOffset( i );
2653
- if ( myScale != 1.0 && myOffset != 0.0 )
+ if ( !qgsDoubleNear( myScale, 1.0 ) || !qgsDoubleNear( myOffset, 0.0 ) )
2654
{
2655
- // if the band has scale and offset to apply change dataType
+ // if the band has scale or offset to apply change dataType
2656
switch ( myGdalDataType )
2657
2658
case GDT_Unknown:
0 commit comments