def createAlgsList(self): self.preloadedAlgs = [] saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208) folder = SagaUtils.sagaDescriptionPath() for descriptionFile in os.listdir(folder): if descriptionFile.endswith("txt"): if not saga208: if descriptionFile.startswith("2.0.8"): continue else: if descriptionFile.startswith("2.1"): continue try: alg = SagaAlgorithm(os.path.join(folder, descriptionFile)) if alg.name.strip() != "": self.preloadedAlgs.append(alg) else: ProcessingLog.addToLog( ProcessingLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile) except Exception, e: ProcessingLog.addToLog( ProcessingLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile + "\n" + str(e))
def _loadAlgorithms(self): self.algs = [] saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208) folder = SagaUtils.sagaDescriptionPath() for descriptionFile in os.listdir(folder): if descriptionFile.endswith("txt"): if not saga208: if descriptionFile.startswith("2.0.8"): continue else: if descriptionFile.startswith("2.1"): continue try: alg = SagaAlgorithm(os.path.join(folder, descriptionFile)) if alg.name.strip() != "": self.algs.append(alg) else: ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile) except Exception,e: ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile +"\n" + str(e))
def _loadAlgorithms(self): self.algs = [] saga208 = ProcessingConfig.getSetting(SagaUtils.SAGA_208) folder = SagaUtils.sagaDescriptionPath() for descriptionFile in os.listdir(folder): if descriptionFile.endswith('txt'): if not saga208: if descriptionFile.startswith('2.0.8'): continue else: if descriptionFile.startswith('2.1'): continue try: alg = SagaAlgorithm(os.path.join(folder, descriptionFile)) if alg.name.strip() != '': self.algs.append(alg) else: ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, 'Could not open SAGA algorithm: ' + descriptionFile) except Exception, e: ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, 'Could not open SAGA algorithm: ' + descriptionFile + '\n' + str(e))