Skip to content
Permalink
Browse files

Merge pull request #950 from gioman/sagaresampling

[processing] suggests to use different parameters with resampling in SAGA and to use the highest resolution when using SAGA raster calculator
  • Loading branch information
volaya committed Oct 20, 2013
2 parents b7cdf5f + c645342 commit 54c576f711999daf2136265c20ced0f4e3fbd6ed
Showing with 3 additions and 3 deletions.
  1. +3 −3 python/plugins/processing/saga/SagaAlgorithm.py
@@ -193,7 +193,7 @@ def addToResamplingExtent(self, layer, first):
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 @@ def resampleRasterLayer(self, layer):
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) \

0 comments on commit 54c576f

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