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 authored and m-kuhn committed Apr 9, 2016
1 parent 2ee6200 commit 156721b3802e4fc5112a3d3053b23adfec6e4e5a
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 156721b

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