Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] saga fixes. "2.0.8 is now default target version
  • Loading branch information
volaya committed Sep 21, 2013
1 parent 22f6360 commit 062e76b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/saga/SagaAlgorithm.py
Expand Up @@ -313,7 +313,7 @@ def processAlgorithm(self, progress):
if isinstance(out, OutputRaster):
filename = out.getCompatibleFileName(self)
filename2 = filename + ".sgrd"
formatIndex = 1 if saga208 else 4
formatIndex = 4 if not saga208 and isWindows() else 1
sessionExportedLayers[filename] = filename2
dontExport = True

Expand Down
6 changes: 2 additions & 4 deletions python/plugins/processing/saga/SagaAlgorithmProvider.py
Expand Up @@ -36,7 +36,6 @@

class SagaAlgorithmProvider(AlgorithmProvider):


def __init__(self):
AlgorithmProvider.__init__(self)
self.activate = True
Expand All @@ -45,7 +44,7 @@ def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
if isWindows():
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_FOLDER, "SAGA folder", SagaUtils.sagaPath()))
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_208, "Enable SAGA 2.0.8 compatibility", False))
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_208, "Enable SAGA 2.0.8 compatibility", True))
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION, "Enable SAGA Import/Export optimizations", False))
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_AUTO_RESAMPLING, "Use min covering grid system for resampling", True))
ProcessingConfig.addSetting(Setting(self.getDescription(), SagaUtils.SAGA_LOG_COMMANDS, "Log execution commands", True))
Expand Down Expand Up @@ -93,8 +92,7 @@ def _loadAlgorithms(self):
self.algs.append(SplitRGBBands())

def getDescription(self):
saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208)
return "SAGA (2.0.8)" if saga208 else "SAGA (2.1)"
return "SAGA"

def getName(self):
return "saga"
Expand Down

0 comments on commit 062e76b

Please sign in to comment.