From c645342c06642e438874679fde5bce434358c6d0 Mon Sep 17 00:00:00 2001 From: gioman Date: Tue, 15 Oct 2013 20:45:46 +0100 Subject: [PATCH] suggests to use different parameters with resampling in SAGA and to use the highest resolution when using SAGA raster calculator --- python/plugins/processing/saga/SagaAlgorithm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/plugins/processing/saga/SagaAlgorithm.py b/python/plugins/processing/saga/SagaAlgorithm.py index 2edd4ee1cab..e2415587de6 100644 --- a/python/plugins/processing/saga/SagaAlgorithm.py +++ b/python/plugins/processing/saga/SagaAlgorithm.py @@ -193,7 +193,7 @@ class SagaAlgorithm(GeoAlgorithm): self.xmax = max(self.xmax, layer.extent().xMaximum()) self.ymin = min(self.ymin, layer.extent().yMinimum()) self.ymax = max(self.ymax, layer.extent().yMaximum()) - self.cellsize = max(self.cellsize, cellsize) + self.cellsize = min(self.cellsize, cellsize) self.inputExtentsCount += 1 def processAlgorithm(self, progress): @@ -430,14 +430,14 @@ class SagaAlgorithm(GeoAlgorithm): saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208) if isWindows() or isMac() or not saga208: s = 'grid_tools "Resampling" -INPUT "' + inputFilename \ - + '" -TARGET 0 -SCALE_UP_METHOD 4 -SCALE_DOWN_METHOD 4 -USER_XMIN ' \ + + '" -TARGET 0 -SCALE_UP_METHOD 0 -SCALE_DOWN_METHOD 0 -USER_XMIN ' \ + str(self.xmin) + ' -USER_XMAX ' + str(self.xmax) \ + ' -USER_YMIN ' + str(self.ymin) + ' -USER_YMAX ' \ + str(self.ymax) + ' -USER_SIZE ' + str(self.cellsize) \ + ' -USER_GRID "' + destFilename + '"' else: s = 'libgrid_tools "Resampling" -INPUT "' + inputFilename \ - + '" -TARGET 0 -SCALE_UP_METHOD 4 -SCALE_DOWN_METHOD 4 -USER_XMIN ' \ + + '" -TARGET 0 -SCALE_UP_METHOD 0 -SCALE_DOWN_METHOD 0 -USER_XMIN ' \ + str(self.xmin) + ' -USER_XMAX ' + str(self.xmax) \ + ' -USER_YMIN ' + str(self.ymin) + ' -USER_YMAX ' \ + str(self.ymax) + ' -USER_SIZE ' + str(self.cellsize) \