Skip to content
Permalink
Browse files

[raster calculator] use feedback when reprojecting raster block

  • Loading branch information
nirvn committed Feb 9, 2018
1 parent e27847d commit 5fa5b868f815efb03506fa7a4614db51d1630eee
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/analysis/raster/qgsrastercalculator.cpp
@@ -88,7 +88,16 @@ int QgsRasterCalculator::processCalculation( QgsFeedback *feedback )
proj.setInput( it->raster->dataProvider() );
proj.setPrecision( QgsRasterProjector::Exact );

block = proj.block( it->bandNumber, mOutputRectangle, mNumOutputColumns, mNumOutputRows );
QgsRasterBlockFeedback *rasterBlockFeedback = new QgsRasterBlockFeedback();
QObject::connect( feedback, &QgsFeedback::canceled, rasterBlockFeedback, &QgsRasterBlockFeedback::cancel );
block = proj.block( it->bandNumber, mOutputRectangle, mNumOutputColumns, mNumOutputRows, rasterBlockFeedback );
if ( rasterBlockFeedback->isCanceled() )
{
delete block;
delete calcNode;
qDeleteAll( inputBlocks );
return static_cast< int >( Canceled );
}
}
else
{

0 comments on commit 5fa5b86

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