apply user no data to identify

This commit is contained in:
Radim Blazek 2012-10-19 12:28:33 +02:00
parent e192e399be
commit 0e889ea0a5
2 changed files with 14 additions and 0 deletions

View File

@ -444,6 +444,13 @@ QMap<int, QVariant> QgsGrassRasterProvider::identify( const QgsPoint & thePoint,
if ( qIsNaN( value ) ) value = noDataValue( 1 );
// Apply user no data
QList<QgsRasterBlock::Range> myNoDataRangeList = userNoDataValue( 1 );
if ( QgsRasterBlock::valueInRange( value, myNoDataRangeList ) )
{
value = noDataValue( 1 );
}
results.insert( 1, value );
return results;

View File

@ -1731,6 +1731,13 @@ QMap<int, QVariant> QgsWcsProvider::identify( const QgsPoint & thePoint, Identif
return results;
}
// Apply user no data
QList<QgsRasterBlock::Range> myNoDataRangeList = userNoDataValue( i );
if ( QgsRasterBlock::valueInRange( value, myNoDataRangeList ) )
{
value = noDataValue( i );
}
results.insert( i, value );
}