Skip to content
Permalink
Browse files

Merge pull request #37455 from elpaso/bugfix-gh37448-raster-quantile-…

…broken

Fix raster quantile classification
  • Loading branch information
elpaso committed Jun 29, 2020
2 parents da8fa08 + 2a53faf commit b18b92728f6a2a0c94a0ec8ead713dec4c99f64b
@@ -2737,7 +2737,7 @@ QgsRasterBandStats QgsGdalProvider::bandStatistics( int bandNo, int stats, const
//int bApproxOK = false; //as we asked for stats, don't get approx values
// GDAL does not have sample size parameter in API, just bApproxOK or not,
// we decide if approximation should be used according to
// total size / sample size ration
// total size / sample size ratio
int bApproxOK = false;
if ( sampleSize > 0 )
{
@@ -350,7 +350,7 @@ void QgsRasterInterface::initHistogram( QgsRasterHistogram &histogram,
// There is no best default value, to display something reasonable in histogram chart,
// binCount should be small, OTOH, to get precise data for cumulative cut, the number should be big.
// Because it is easier to define fixed lower value for the chart, we calc optimum binCount
// for higher resolution (to avoid calculating that where histogram() is used. In any any case,
// for higher resolution (to avoid calculating that where histogram() is used. In any case,
// it does not make sense to use more than width*height;

// for Int16/Int32 make sure bin count <= actual range, because there is no sense in having
@@ -169,6 +169,7 @@ void QgsSingleBandPseudoColorRendererWidget::setFromRenderer( const QgsRasterRen
else
{
mMinMaxWidget->setBands( QList< int >() << mBandComboBox->currentBand() );
mColorRampShaderWidget->setRasterBand( mBandComboBox->currentBand() );
}
}

@@ -183,7 +184,6 @@ void QgsSingleBandPseudoColorRendererWidget::bandChanged()

void QgsSingleBandPseudoColorRendererWidget::loadMinMax( int bandNo, double min, double max )
{
Q_UNUSED( bandNo )
QgsDebugMsg( QStringLiteral( "theBandNo = %1 min = %2 max = %3" ).arg( bandNo ).arg( min ).arg( max ) );

if ( std::isnan( min ) )

0 comments on commit b18b927

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