本文整理汇总了Python中TauDEMUtils.TauDEMUtils.taudemDescriptionPath方法的典型用法代码示例。如果您正苦于以下问题:Python TauDEMUtils.taudemDescriptionPath方法的具体用法?Python TauDEMUtils.taudemDescriptionPath怎么用?Python TauDEMUtils.taudemDescriptionPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TauDEMUtils.TauDEMUtils
的用法示例。
在下文中一共展示了TauDEMUtils.taudemDescriptionPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createAlgsList
# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemDescriptionPath [as 别名]
def createAlgsList(self):
self.preloadedAlgs = []
folder = TauDEMUtils.taudemDescriptionPath()
for descriptionFile in os.listdir(folder):
if descriptionFile.endswith('txt'):
try:
alg = TauDEMAlgorithm(os.path.join(folder,
descriptionFile))
if alg.name.strip() != '':
self.preloadedAlgs.append(alg)
else:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('Could not open TauDEM algorithm: %s' % descriptionFile))
except Exception, e:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('Could not open TauDEM algorithm: %s' % descriptionFile))
示例2: _loadAlgorithms
# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemDescriptionPath [as 别名]
def _loadAlgorithms(self):
self.algs = []
basePath = TauDEMUtils.taudemDescriptionPath()
if ProcessingConfig.getSetting(TauDEMUtils.TAUDEM_USE_SINGLEFILE):
folder = os.path.join(basePath, "single")
for descriptionFile in os.listdir(folder):
if descriptionFile.endswith("txt"):
descriptionFile = os.path.join(folder, descriptionFile)
self._algFromDescription(descriptionFile)
self.algs.append(PeukerDouglas())
self.algs.append(SlopeArea())
self.algs.append(LengthArea())
self.algs.append(DropAnalysis())
self.algs.append(DinfDistDown())
self.algs.append(DinfDistUp())
self.algs.append(GridNet())
self.algs.append(DinfTransLimAccum())
self.algs.append(DinfTransLimAccum2())
if ProcessingConfig.getSetting(TauDEMUtils.TAUDEM_USE_MULTIFILE):
folder = os.path.join(basePath, "multi")
for descriptionFile in os.listdir(folder):
if descriptionFile.endswith("txt"):
descriptionFile = os.path.join(folder, descriptionFile)
self._algFromDescription(descriptionFile, True)
self.algs.append(PeukerDouglasMulti())
self.algs.append(SlopeAreaMulti())
self.algs.append(LengthAreaMulti())
self.algs.append(DropAnalysisMulti())
self.algs.append(DinfDistDownMulti())
self.algs.append(DinfDistUpMulti())
self.algs.append(GridNetMulti())
self.algs.append(DinfTransLimAccumMulti())
self.algs.append(DinfTransLimAccum2Multi())