mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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.
This commit is contained in:
parent
2ee6200eb0
commit
156721b380
@ -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 ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user