Skip to content
Permalink
Browse files

Use new QgsRasterCalculator ctor with transform context

  • Loading branch information
elpaso authored and nyalldawson committed Apr 17, 2019
1 parent 8bdfc7c commit cd9fe8cdec1e7033e6eb1b5cc8c8ced4e5b1dc74
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/app/qgisapp.cpp
@@ -5799,7 +5799,15 @@ void QgisApp::showRasterCalculator()
if ( d.exec() == QDialog::Accepted )
{
//invoke analysis library
QgsRasterCalculator rc( d.formulaString(), d.outputFile(), d.outputFormat(), d.outputRectangle(), d.outputCrs(), d.numberOfColumns(), d.numberOfRows(), QgsRasterCalculatorEntry::rasterEntries() );
QgsRasterCalculator rc( d.formulaString(),
d.outputFile(),
d.outputFormat(),
d.outputRectangle(),
d.outputCrs(),
d.numberOfColumns(),
d.numberOfRows(),
QgsRasterCalculatorEntry::rasterEntries(),
QgsProject::instance()->transformContext() );

QProgressDialog p( tr( "Calculating raster expression…" ), tr( "Abort" ), 0, 0 );
p.setWindowModality( Qt::WindowModal );
@@ -7546,7 +7554,7 @@ QString QgisApp::saveAsRasterFile( QgsRasterLayer *rasterLayer, const bool defau
if ( d.outputCrs() != rasterLayer->crs() )
{
QgsRasterProjector *projector = new QgsRasterProjector;
projector->setCrs( rasterLayer->crs(), d.outputCrs(), rasterLayer->dataProvider()->transformContext() );
projector->setCrs( rasterLayer->crs(), d.outputCrs(), QgsProject::instance()->transformContext() );
if ( !pipe->insert( 2, projector ) )
{
QgsDebugMsg( QStringLiteral( "Cannot set pipe projector" ) );

0 comments on commit cd9fe8c

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