Skip to content

Commit

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

git-svn-id: http://svn.osgeo.org/qgis/trunk@12570 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed Dec 22, 2009
1 parent 6ba01e2 commit 20ee962
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/raster/qgsrasterlayer.cpp
Original file line number Diff line number Diff line change
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 20ee962

Please sign in to comment.