Skip to content

Commit 439b9de

Browse files
committedApr 4, 2017
fixed saga algorithm to adapt it to 2.3 syntax
1 parent 27d5bbb commit 439b9de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎python/plugins/processing/algs/saga/SagaAlgorithm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ def processAlgorithm(self, feedback):
212212
command += ' -' + param.name + ' "' + s + '"'
213213
elif isinstance(param, ParameterBoolean):
214214
if param.value:
215-
command += ' -' + param.name
215+
command += ' -' + param.name.strip() + " true"
216+
else:
217+
command += ' -' + param.name.strip() + " false"
216218
elif isinstance(param, ParameterFixedTable):
217219
tempTableFile = getTempFilename('txt')
218220
with open(tempTableFile, 'w') as f:
@@ -325,7 +327,7 @@ def exportRasterLayer(self, source):
325327
destFilename = getTempFilenameInTempFolder(filename + '.sgrd')
326328
self.exportedLayers[source] = destFilename
327329
sessionExportedLayers[source] = destFilename
328-
return 'io_gdal 0 -TRANSFORM -RESAMPLING 0 -GRIDS "' + destFilename + '" -FILES "' + source + '"'
330+
return 'io_gdal 0 -TRANSFORM 1 -RESAMPLING 0 -GRIDS "' + destFilename + '" -FILES "' + source + '"'
329331

330332
def checkParameterValuesBeforeExecuting(self):
331333
"""

0 commit comments

Comments
 (0)
Please sign in to comment.