Skip to content

Commit 0e889ea

Browse files
committed
apply user no data to identify
1 parent e192e39 commit 0e889ea

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/providers/grass/qgsgrassrasterprovider.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,13 @@ QMap<int, QVariant> QgsGrassRasterProvider::identify( const QgsPoint & thePoint,
444444

445445
if ( qIsNaN( value ) ) value = noDataValue( 1 );
446446

447+
// Apply user no data
448+
QList<QgsRasterBlock::Range> myNoDataRangeList = userNoDataValue( 1 );
449+
if ( QgsRasterBlock::valueInRange( value, myNoDataRangeList ) )
450+
{
451+
value = noDataValue( 1 );
452+
}
453+
447454
results.insert( 1, value );
448455

449456
return results;

src/providers/wcs/qgswcsprovider.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1731,6 +1731,13 @@ QMap<int, QVariant> QgsWcsProvider::identify( const QgsPoint & thePoint, Identif
17311731
return results;
17321732
}
17331733

1734+
// Apply user no data
1735+
QList<QgsRasterBlock::Range> myNoDataRangeList = userNoDataValue( i );
1736+
if ( QgsRasterBlock::valueInRange( value, myNoDataRangeList ) )
1737+
{
1738+
value = noDataValue( i );
1739+
}
1740+
17341741
results.insert( i, value );
17351742
}
17361743

0 commit comments

Comments
 (0)