Skip to content

Commit

Permalink
apply user no data to identify
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Oct 19, 2012
1 parent e192e39 commit 0e889ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/providers/grass/qgsgrassrasterprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/providers/wcs/qgswcsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down

0 comments on commit 0e889ea

Please sign in to comment.