Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
-fixed nodata bug when calculating min/max from current extent
-Closes ticket #2309

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12570 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed Dec 22, 2009
1 parent 615e772 commit 5894cff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -1314,6 +1314,10 @@ void QgsRasterLayer::computeMinimumMaximumFromLastExtent( int theBand, double* t
for ( int myColumn = 0; myColumn < mLastViewPort.drawableAreaXDim; ++myColumn )
{
myValue = readValue( myGdalScanData, myDataType, myRow * mLastViewPort.drawableAreaXDim + myColumn );
if ( mValidNoDataValue && ( fabs( myValue - mNoDataValue ) <= TINY_VALUE || myValue != myValue ) )
{
continue;
}
myMin = qMin( myMin, myValue );
myMax = qMax( myMax, myValue );
}
Expand Down

0 comments on commit 5894cff

Please sign in to comment.