Skip to content
Permalink
Browse files
Use average mode for align raster downsample tests
GDAL 2.0 changed (fixed) the bilinear downsampling algorithm, so
switch to the average algorithm so that test results are the same
for GDAL versions >= 2.0 and < 2.0.
  • Loading branch information
nyalldawson committed Jul 23, 2016
1 parent d3eb6ce commit 4f6422a2dfea09ae528462c3b847934afeb80662
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/src/analysis/testqgsalignraster.cpp
@@ -169,7 +169,7 @@ class TestAlignRaster : public QObject
QgsAlignRaster align;
QgsAlignRaster::List rasters;
rasters << QgsAlignRaster::Item( SRC_FILE, tmpFile );
rasters[0].resampleMethod = QgsAlignRaster::RA_Bilinear;
rasters[0].resampleMethod = QgsAlignRaster::RA_Average;
align.setRasters( rasters );
align.setParametersFromRaster( SRC_FILE, QString(), QSizeF( 0.4, 0.4 ) );
bool res = align.run();
@@ -190,7 +190,7 @@ class TestAlignRaster : public QObject
QgsAlignRaster align;
QgsAlignRaster::List rasters;
rasters << QgsAlignRaster::Item( SRC_FILE, tmpFile );
rasters[0].resampleMethod = QgsAlignRaster::RA_Bilinear;
rasters[0].resampleMethod = QgsAlignRaster::RA_Average;
rasters[0].rescaleValues = true;
align.setRasters( rasters );
align.setParametersFromRaster( SRC_FILE, QString(), QSizeF( 0.4, 0.4 ) );

0 comments on commit 4f6422a

Please sign in to comment.