Skip to content

Commit

Permalink
Fix raster quantile classification
Browse files Browse the repository at this point in the history
Fixes #37448
  • Loading branch information
elpaso committed Jun 28, 2020
1 parent 9b8e983 commit 2a53faf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -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 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterinterface.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Expand Up @@ -169,6 +169,7 @@ void QgsSingleBandPseudoColorRendererWidget::setFromRenderer( const QgsRasterRen
else
{
mMinMaxWidget->setBands( QList< int >() << mBandComboBox->currentBand() );
mColorRampShaderWidget->setRasterBand( mBandComboBox->currentBand() );
}
}

Expand All @@ -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 ) )
Expand Down

0 comments on commit 2a53faf

Please sign in to comment.