mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
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.
This commit is contained in:
parent
b83b59dc77
commit
914ecc9c09
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user