Skip to content
Permalink
Browse files

[processing] always use SAGA shipped with OSGeo4W

  • Loading branch information
alexbruy committed May 30, 2017
1 parent 962e2ca commit 75ee7da22c9be5ff07312cff87aa5ef9e5815c9e
@@ -47,11 +47,6 @@ def __init__(self):
self.activate = True

def initializeSettings(self):
if (isWindows() or isMac()):
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_FOLDER, self.tr('SAGA folder'),
'',
valuetype=Setting.FOLDER))
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION,
self.tr('Enable SAGA Import/Export optimizations'), False))
@@ -67,9 +62,6 @@ def initializeSettings(self):

def unload(self):
AlgorithmProvider.unload(self)
if (isWindows() or isMac()):
ProcessingConfig.removeSetting(SagaUtils.SAGA_FOLDER)

ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_COMMANDS)

@@ -38,7 +38,6 @@

SAGA_LOG_COMMANDS = 'SAGA_LOG_COMMANDS'
SAGA_LOG_CONSOLE = 'SAGA_LOG_CONSOLE'
SAGA_FOLDER = 'SAGA_FOLDER'
SAGA_IMPORT_EXPORT_OPTIMIZATION = 'SAGA_IMPORT_EXPORT_OPTIMIZATION'

_installedVersion = None
@@ -82,14 +81,10 @@ def findSagaFolder():


def sagaPath():
folder = ProcessingConfig.getSetting(SAGA_FOLDER)
if folder and not os.path.isdir(folder):
folder = None
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING,
'Specified SAGA folder does not exist. Will try to find built-in binaries.')
if folder is None or folder == '':
folder = findSagaFolder()
if not isWindows() and not isMac():
return ''

folder = findSagaFolder()
return folder or ''


0 comments on commit 75ee7da

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