def _loadAlgorithms(self): self.createAlgsList(GPFUtils.snapKey(), SNAPAlgorithm) self.algs = self.preloadedAlgs if ProcessingConfig.getSetting(GPFUtils.S1TBX_ACTIVATE) == True: self.createAlgsList(GPFUtils.s1tbxKey(), S1TbxAlgorithm) for alg in self.preloadedAlgs: self.algs.append(alg) if ProcessingConfig.getSetting(GPFUtils.S2TBX_ACTIVATE) == True: self.createAlgsList(GPFUtils.s2tbxKey(), S2TbxAlgorithm) for alg in self.preloadedAlgs: self.algs.append(alg) # Also load models self.loadGpfModels(GPFUtils.modelsFolder())
def initializeSettings(self): AlgorithmProvider.initializeSettings(self) ProcessingConfig.addSetting( Setting(self.getDescription(), GPFUtils.SNAP_FOLDER, "SNAP install directory", GPFUtils.programPath(GPFUtils.snapKey()))) ProcessingConfig.addSetting( Setting(self.getDescription(), GPFUtils.SNAP_THREADS, "Maximum number of parallel (native) threads", 4)) ProcessingConfig.addSetting( Setting(self.getDescription(), GPFUtils.GPF_MODELS_FOLDER, "GPF models' directory", GPFUtils.modelsFolder())) ProcessingConfig.addSetting( Setting(self.getDescription(), GPFUtils.S1TBX_ACTIVATE, "Activate Sentinel-1 toolbox", False)) ProcessingConfig.addSetting( Setting(self.getDescription(), GPFUtils.S2TBX_ACTIVATE, "Activate Sentinel-2 toolbox", False))