Skip to content

Commit 20ee962

Browse files
author
ersts
committed
-fixed nodata bug when calculating min/max from current extent
-Closes ticket #2309 git-svn-id: http://svn.osgeo.org/qgis/trunk@12570 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6ba01e2 commit 20ee962

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/raster/qgsrasterlayer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,10 @@ void QgsRasterLayer::computeMinimumMaximumFromLastExtent( int theBand, double* t
13141314
for ( int myColumn = 0; myColumn < mLastViewPort.drawableAreaXDim; ++myColumn )
13151315
{
13161316
myValue = readValue( myGdalScanData, myDataType, myRow * mLastViewPort.drawableAreaXDim + myColumn );
1317+
if ( mValidNoDataValue && ( fabs( myValue - mNoDataValue ) <= TINY_VALUE || myValue != myValue ) )
1318+
{
1319+
continue;
1320+
}
13171321
myMin = qMin( myMin, myValue );
13181322
myMax = qMax( myMax, myValue );
13191323
}

0 commit comments

Comments
 (0)