Skip to content
Permalink
Browse files

-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
ersts committed Dec 22, 2009
1 parent 615e772 commit 5894cfff692e313831918afd22c920bf4f733969
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/raster/qgsrasterlayer.cpp
@@ -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 );
}

0 comments on commit 5894cff

Please sign in to comment.
You can’t perform that action at this time.