Skip to content

Commit

Permalink
Use average mode for align raster downsample tests
Browse files Browse the repository at this point in the history
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 156721b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/analysis/testqgsalignraster.cpp
Expand Up @@ -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();
Expand All @@ -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 ) );
Expand Down

0 comments on commit 156721b

Please sign in to comment.