当前位置: 首页>>代码示例>>Python>>正文


Python TauDEMUtils.taudemMultifilePath方法代码示例

本文整理汇总了Python中TauDEMUtils.TauDEMUtils.taudemMultifilePath方法的典型用法代码示例。如果您正苦于以下问题:Python TauDEMUtils.taudemMultifilePath方法的具体用法?Python TauDEMUtils.taudemMultifilePath怎么用?Python TauDEMUtils.taudemMultifilePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TauDEMUtils.TauDEMUtils的用法示例。


在下文中一共展示了TauDEMUtils.taudemMultifilePath方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: processAlgorithm

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def processAlgorithm(self, progress):
        commands = []
        commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec'))

        processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)
        if processNum <= 0:
            raise GeoAlgorithmExecutionException(
                self.tr('Wrong number of MPI processes used. Please set '
                        'correct number before running TauDEM algorithms.'))

        commands.append('-n')
        commands.append(str(processNum))
        commands.append(os.path.join(TauDEMUtils.taudemMultifilePath(), self.cmdName))
        commands.append('-p')
        commands.append(self.getParameterValue(self.D8_FLOW_DIR_GRID))
        param = self.getParameterValue(self.OUTLETS_SHAPE)
        if param is not None:
            commands.append('-o')
            commands.append(param)
        param = self.getParameterValue(self.MASK_GRID)
        if param is not None:
            commands.append('-mask')
            commands.append(param)
            commands.append('-thresh')
            commands.append(self.getParameterValue(self.THRESHOLD))

        commands.append('-plen')
        commands.append(self.getOutputValue(self.LONGEST_LEN_GRID))
        commands.append('-tlen')
        commands.append(self.getOutputValue(self.TOTAL_LEN_GRID))
        commands.append('-gord')
        commands.append(self.getOutputValue(self.STRAHLER_GRID))

        TauDEMUtils.executeTauDEM(commands, progress)
开发者ID:Br1ndavoine,项目名称:QGIS,代码行数:36,代码来源:gridnet_multi.py

示例2: processAlgorithm

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def processAlgorithm(self, progress):
        commands = []
        commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec'))

        processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)
        if processNum <= 0:
            raise GeoAlgorithmExecutionException(
                self.tr('Wrong number of MPI processes used. Please set '
                        'correct number before running TauDEM algorithms.'))

        commands.append('-n')
        commands.append(str(processNum))
        commands.append(os.path.join(TauDEMUtils.taudemMultifilePath(), self.cmdName))
        commands.append('-ang')
        commands.append(self.getParameterValue(self.DINF_FLOW_DIR_GRID))
        commands.append('-fel')
        commands.append(self.getParameterValue(self.PIT_FILLED_GRID))
        commands.append('-src')
        commands.append(self.getParameterValue(self.STREAM_GRID))
        wg = self.getParameterValue(self.WEIGHT_PATH_GRID)
        if wg is not None:
            commands.append('-wg')
            commands.append(self.getParameterValue(self.WEIGHT_PATH_GRID))
        commands.append('-m')
        commands.append(str(self.STAT_DICT[self.getParameterValue(
            self.STAT_METHOD)]))
        commands.append(str(self.DIST_DICT[self.getParameterValue(
            self.DIST_METHOD)]))
        if not self.getParameterValue(self.EDGE_CONTAM):
            commands.append('-nc')
        commands.append('-dd')
        commands.append(self.getOutputValue(self.DIST_DOWN_GRID))

        TauDEMUtils.executeTauDEM(commands, progress)
开发者ID:Br1ndavoine,项目名称:QGIS,代码行数:36,代码来源:dinfdistdown_multi.py

示例3: processAlgorithm

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def processAlgorithm(self, progress):
        commands = []
        commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec'))

        processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)
        if processNum <= 0:
            raise GeoAlgorithmExecutionException(
                self.tr('Wrong number of MPI processes used. Please set '
                        'correct number before running TauDEM algorithms.'))

        commands.append('-n')
        commands.append(str(processNum))
        commands.append(os.path.join(TauDEMUtils.taudemMultifilePath(), self.cmdName))
        commands.append('-ang')
        commands.append(self.getParameterValue(self.DINF_FLOW_DIR_GRID))
        commands.append('-tsup')
        commands.append(self.getParameterValue(self.SUPPLY_GRID))
        commands.append('-tc')
        commands.append(self.getParameterValue(self.CAPACITY_GRID))
        param = self.getParameterValue(self.OUTLETS_SHAPE)
        if param is not None:
            commands.append('-o')
            commands.append(param)
        if not self.getParameterValue(self.EDGE_CONTAM):
            commands.append('-nc')

        commands.append('-tla')
        commands.append(self.getOutputValue(self.TRANSP_LIM_ACCUM_GRID))
        commands.append('-tdep')
        commands.append(self.getOutputValue(self.DEPOSITION_GRID))

        TauDEMUtils.executeTauDEM(commands, progress)
开发者ID:Br1ndavoine,项目名称:QGIS,代码行数:34,代码来源:dinftranslimaccum_multi.py

示例4: processAlgorithm

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def processAlgorithm(self, progress):
        commands = []
        commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec'))

        processNum = int(ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES))
        if processNum <= 0:
            raise GeoAlgorithmExecutionException(
                self.tr('Wrong number of MPI processes used. Please set '
                        'correct number before running TauDEM algorithms.'))

        commands.append('-n')
        commands.append(unicode(processNum))
        commands.append(os.path.join(TauDEMUtils.taudemMultifilePath(), self.cmdName))

        for param in self.parameters:
            if param.value is None or param.value == '':
                continue
            if isinstance(param, ParameterNumber):
                commands.append(param.name)
                commands.append(unicode(param.value))
            if isinstance(param, (ParameterFile, ParameterVector)):
                commands.append(param.name)
                commands.append(param.value)
            elif isinstance(param, ParameterBoolean):
                if param.value and unicode(param.value).lower() == 'false':
                    commands.append(param.name)
            elif isinstance(param, ParameterString):
                commands.append(param.name)
                commands.append(unicode(param.value))

        for out in self.outputs:
            commands.append(out.name)
            commands.append(out.value)

        TauDEMUtils.executeTauDEM(commands, progress)
开发者ID:siliconsmiley,项目名称:QGIS,代码行数:37,代码来源:TauDEMMultifileAlgorithm.py

示例5: processAlgorithm

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def processAlgorithm(self, progress):
        commands = []
        commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec'))

        processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)
        if processNum <= 0:
            raise GeoAlgorithmExecutionException(
                self.tr('Wrong number of MPI processes used. Please set '
                        'correct number before running TauDEM algorithms.'))

        commands.append('-n')
        commands.append(unicode(processNum))
        commands.append(os.path.join(TauDEMUtils.taudemMultifilePath(), self.cmdName))
        commands.append('-ad8')
        commands.append(self.getParameterValue(self.D8_CONTRIB_AREA_GRID))
        commands.append('-p')
        commands.append(self.getParameterValue(self.D8_FLOW_DIR_GRID))
        commands.append('-fel')
        commands.append(self.getParameterValue(self.PIT_FILLED_GRID))
        commands.append('-ssa')
        commands.append(self.getParameterValue(self.ACCUM_STREAM_SOURCE_GRID))
        commands.append('-o')
        commands.append(self.getParameterValue(self.OUTLETS_SHAPE))
        commands.append('-par')
        commands.append(unicode(self.getParameterValue(self.MIN_TRESHOLD)))
        commands.append(unicode(self.getParameterValue(self.MAX_THRESHOLD)))
        commands.append(unicode(self.getParameterValue(self.TRESHOLD_NUM)))
        commands.append(unicode(self.getParameterValue(self.STEPS)))
        commands.append('-drp')
        commands.append(self.getOutputValue(self.DROP_ANALYSIS_FILE))

        TauDEMUtils.executeTauDEM(commands, progress)
开发者ID:siliconsmiley,项目名称:QGIS,代码行数:34,代码来源:dropanalysis_multi.py

示例6: initializeSettings

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def initializeSettings(self):
        AlgorithmProvider.initializeSettings(self)

        ProcessingConfig.addSetting(
            Setting(
                self.getDescription(),
                TauDEMUtils.TAUDEM_FOLDER,
                self.tr("TauDEM command line tools folder"),
                TauDEMUtils.taudemPath(),
            )
        )
        ProcessingConfig.addSetting(
            Setting(
                self.getDescription(),
                TauDEMUtils.TAUDEM_MULTIFILE_FOLDER,
                self.tr("TauDEM multifile command line tools folder"),
                TauDEMUtils.taudemMultifilePath(),
            )
        )
        ProcessingConfig.addSetting(
            Setting(
                self.getDescription(),
                TauDEMUtils.TAUDEM_USE_SINGLEFILE,
                self.tr("Enable singlefile TauDEM tools"),
                True,
            )
        )
        ProcessingConfig.addSetting(
            Setting(
                self.getDescription(), TauDEMUtils.TAUDEM_USE_MULTIFILE, self.tr("Enable multifile TauDEM tools"), False
            )
        )
        ProcessingConfig.addSetting(
            Setting(
                self.getDescription(),
                TauDEMUtils.MPIEXEC_FOLDER,
                self.tr("MPICH2/OpenMPI bin directory"),
                TauDEMUtils.mpiexecPath(),
            )
        )
        ProcessingConfig.addSetting(
            Setting(
                self.getDescription(), TauDEMUtils.MPI_PROCESSES, self.tr("Number of MPI parallel processes to use"), 2
            )
        )
开发者ID:meizhoubao,项目名称:QGIS,代码行数:47,代码来源:TauDEMAlgorithmProvider.py

示例7: processAlgorithm

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def processAlgorithm(self, progress):
        commands = []
        commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec'))

        processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)
        if processNum <= 0:
            raise GeoAlgorithmExecutionException(
                self.tr('Wrong number of MPI processes used. Please set '
                        'correct number before running TauDEM algorithms.'))

        commands.append('-n')
        commands.append(str(processNum))
        commands.append(os.path.join(TauDEMUtils.taudemMultifilePath(), self.cmdName))
        commands.append('-fel')
        commands.append(self.getParameterValue(self.ELEVATION_GRID))
        commands.append('-par')
        commands.append(str(self.getParameterValue(self.CENTER_WEIGHT)))
        commands.append(str(self.getParameterValue(self.SIDE_WEIGHT)))
        commands.append(str(self.getParameterValue(self.DIAGONAL_WEIGHT)))
        commands.append('-ss')
        commands.append(self.getOutputValue(self.STREAM_SOURCE_GRID))

        TauDEMUtils.executeTauDEM(commands, progress)
开发者ID:Br1ndavoine,项目名称:QGIS,代码行数:25,代码来源:peukerdouglas_multi.py

示例8: processAlgorithm

# 需要导入模块: from TauDEMUtils import TauDEMUtils [as 别名]
# 或者: from TauDEMUtils.TauDEMUtils import taudemMultifilePath [as 别名]
    def processAlgorithm(self, progress):
        commands = []
        commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec'))

        processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)
        if processNum <= 0:
            raise GeoAlgorithmExecutionException(
                self.tr('Wrong number of MPI processes used. Please set '
                        'correct number before running TauDEM algorithms.'))

        commands.append('-n')
        commands.append(unicode(processNum))
        commands.append(os.path.join(TauDEMUtils.taudemMultifilePath(), self.cmdName))
        commands.append('-slp')
        commands.append(self.getParameterValue(self.SLOPE_GRID))
        commands.append('-sca')
        commands.append(self.getParameterValue(self.AREA_GRID))
        commands.append('-par')
        commands.append(unicode(self.getParameterValue(self.SLOPE_EXPONENT)))
        commands.append(unicode(self.getParameterValue(self.AREA_EXPONENT)))
        commands.append('-sa')
        commands.append(self.getOutputValue(self.SLOPE_AREA_GRID))

        TauDEMUtils.executeTauDEM(commands, progress)
开发者ID:Geoneer,项目名称:QGIS,代码行数:26,代码来源:slopearea_multi.py


注:本文中的TauDEMUtils.TauDEMUtils.taudemMultifilePath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。