本文整理汇总了Python中sextante.core.GeoAlgorithm.GeoAlgorithm类的典型用法代码示例。如果您正苦于以下问题:Python GeoAlgorithm类的具体用法?Python GeoAlgorithm怎么用?Python GeoAlgorithm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GeoAlgorithm类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
GeoAlgorithm.__init__(self)
#the dialog where this model is being edited
self.modelerdialog = None
self.descriptionFile = None
#Geoalgorithms in this model
self.algs = []
#parameters of Geoalgorithms in self.algs.
#Each entry is a map with (paramname, paramvalue) values for algs[i].
#paramvalues are instances of AlgorithmAndParameter
self.algParameters = []
#algorithms that each algorithm depends on.
#This is just a list of dependencies not set by outputs and inputs
#but explicitely entered instead, meaning that an algorithm must ''wait''
#for another to finish
#Each entry is a list with algorithm indexes
self.dependencies = []
#outputs of Geoalgorithms in self.algs.
#Each entry is a map with (output, outputvalue) values for algs[i].
#outputvalue is the name of the output if final. None if is an intermediate output
self.algOutputs = []
#Hardcoded parameter values entered by the user when defining the model. Keys are value names.
self.paramValues = {}
#position of items in canvas
self.algPos = []
self.paramPos = []
#deactivated algorithms that should not be executed
self.deactivated = []
开发者ID:badcock4412,项目名称:Quantum-GIS,代码行数:35,代码来源:ModelerAlgorithm.py
示例2: __init__
def __init__(self, descriptionfile):
GeoAlgorithm.__init__(self)
self.descriptionFile = descriptionfile
self.defineCharacteristicsFromFile()
self.numExportedLayers = 0
#GRASS console output, needed to do postprocessing in case GRASS dumps results to the console
self.consoleOutput = []
开发者ID:tomyun,项目名称:Quantum-GIS,代码行数:7,代码来源:GrassAlgorithm.py
示例3: __init__
def __init__(self, descriptionfile):
GeoAlgorithm.__init__(self)
self.roiFile = None
self.descriptionFile = descriptionfile
self.defineCharacteristicsFromFile()
self.numExportedLayers = 0
self.hasROI = None;
开发者ID:mokerjoke,项目名称:Quantum-GIS,代码行数:7,代码来源:OTBAlgorithm.py
示例4: __init__
def __init__(self):
GeoAlgorithm.__init__(self)
# the dialog where this model is being edited
self.modelerdialog = None
self.descriptionFile = None
# Geoalgorithms in this model
self.algs = []
# parameters of Geoalgorithms in self.algs.
# Each entry is a map with (paramname, paramvalue) values for algs[i].
# paramvalues are instances of AlgorithmAndParameter
self.algParameters = []
# outputs of Geoalgorithms in self.algs.
# Each entry is a map with (output, outputvalue) values for algs[i].
# outputvalue is the name of the output if final. None if is an intermediate output
self.algOutputs = []
# Hardcoded parameter values entered by the user when defining the model. Keys are value names.
self.paramValues = {}
# position of items in canvas
self.algPos = []
self.paramPos = []
# deactivated algorithms that should not be executed
self.deactivated = []
开发者ID:hCivil,项目名称:Quantum-GIS,代码行数:28,代码来源:ModelerAlgorithm.py
示例5: __init__
def __init__(self, descriptionFile, script=None):
GeoAlgorithm.__init__(self)
self.script = script
self.descriptionFile = descriptionFile
if script is not None:
self.defineCharacteristicsFromScript()
if descriptionFile is not None:
self.defineCharacteristicsFromFile()
开发者ID:jietaowang,项目名称:Quantum-GIS,代码行数:8,代码来源:RAlgorithm.py
示例6: __init__
def __init__(self, descriptionfile):
self.resample = True #True if it should resample
#in case several non-matching raster layers are used as input
GeoAlgorithm.__init__(self)
self.descriptionFile = descriptionfile
self.defineCharacteristicsFromFile()
if self.resample:
#reconsider resampling policy now that we know the input parameters
self.resample = self.setResamplingPolicy()
开发者ID:badcock4412,项目名称:Quantum-GIS,代码行数:9,代码来源:SagaAlgorithm.py
示例7: __init__
def __init__(self, descriptionFile, script=None):
'''The script parameter can be used to directly pass the code of the script without a file.
This is to be used from the script edition dialog, but should not be used in other cases'''
GeoAlgorithm.__init__(self)
self.script = script
self.descriptionFile = descriptionFile
if script is not None:
self.defineCharacteristicsFromScript()
if descriptionFile is not None:
self.defineCharacteristicsFromFile()
开发者ID:Adam-Brown,项目名称:Quantum-GIS,代码行数:10,代码来源:ScriptAlgorithm.py
示例8: __init__
def __init__(self, alg):
useCategories = SextanteConfig.getSetting(SextanteConfig.USE_CATEGORIES)
QTreeWidgetItem.__init__(self)
self.alg = alg
icon = alg.getIcon()
name = alg.name
if useCategories:
icon = GeoAlgorithm.getDefaultIcon()
group, subgroup, name = AlgorithmDecorator.getGroupsAndName(alg)
self.setIcon(0, icon)
self.setToolTip(0, name)
self.setText(0, name)
开发者ID:PepSalehi,项目名称:Quantum-GIS,代码行数:12,代码来源:SextanteToolbox.py
示例9: getPostProcessingErrorMessage
def getPostProcessingErrorMessage(self, wrongLayers):
html = GeoAlgorithm.getPostProcessingErrorMessage(self, wrongLayers)
msg = GrassUtils.checkGrassIsInstalled(True)
html += ("<p>This algorithm requires GRASS to be run. A test to check if GRASS is correctly installed "
"and configured in your system has been performed, with the following result:</p><ul><i>")
if msg is None:
html += "GRASS seems to be correctly installed and configured</i></li></ul>"
else:
html += msg + "</i></li></ul>"
html += '<p><a href= "http://docs.qgis.org/2.0/html/en/docs/user_manual/sextante/3rdParty.html">Click here</a> to know more about how to install and configure GRASS to be used with SEXTANTE</p>'
return html
开发者ID:Adam-Brown,项目名称:Quantum-GIS,代码行数:12,代码来源:GrassAlgorithm.py
示例10: __init__
def __init__(self, alg):
settings = QSettings()
useCategories = settings.value(SextanteToolbox.USE_CATEGORIES, type=bool)
QTreeWidgetItem.__init__(self)
self.alg = alg
icon = alg.getIcon()
name = alg.name
if useCategories:
icon = GeoAlgorithm.getDefaultIcon()
group, subgroup, name = AlgorithmDecorator.getGroupsAndName(alg)
self.setIcon(0, icon)
self.setToolTip(0, name)
self.setText(0, name)
开发者ID:jetuk,项目名称:Quantum-GIS,代码行数:13,代码来源:SextanteToolbox.py
示例11: getPostProcessingErrorMessage
def getPostProcessingErrorMessage(self, wrongLayers):
html = GeoAlgorithm.getPostProcessingErrorMessage(self, wrongLayers)
msg = RUtils.checkRIsInstalled(True)
html += ("<p>This algorithm requires R to be run. A test to check if R is correctly installed "
"and configured in your system has been performed, with the following result:</p><ul><i>")
if msg is None:
html += "GRASS seems to be correctly installed and configured</i></li></ul>"
html += "<p>The script you have executed needs the following packages:</p><ul>"
packages = RUtils.getRequiredPackages(self.script)
for p in packages:
html += '<li>' + p + '</li>'
html += "</ul><p>Make sure they are installed in your R environment before trying to execute this script.</p>"
else:
html += msg + "</i></li></ul>"
html += '<p><a href= "http://docs.qgis.org/2.0/html/en/docs/user_manual/sextante/3rdParty.html">Click here</a> to know more about how to install and configure R to be used with SEXTANTE</p>'
return html
开发者ID:Adam-Brown,项目名称:Quantum-GIS,代码行数:17,代码来源:RAlgorithm.py
示例12: getAsCommand
def getAsCommand(self):
if self.descriptionFile:
return GeoAlgorithm.getAsCommand(self)
else:
return None
开发者ID:badcock4412,项目名称:Quantum-GIS,代码行数:5,代码来源:ModelerAlgorithm.py
示例13: fillTreeUsingCategories
def fillTreeUsingCategories(self):
providersToExclude = ["model", "script"]
self.algorithmTree.clear()
text = unicode(self.searchBox.text())
groups = {}
for providerName in Sextante.algs.keys():
provider = Sextante.algs[providerName]
name = "ACTIVATE_" + providerName.upper().replace(" ", "_")
if not SextanteConfig.getSetting(name):
continue
if providerName in providersToExclude or len(Providers.providers[providerName].actions) != 0:
continue
algs = provider.values()
#add algorithms
for alg in algs:
if not alg.showInToolbox:
continue
altgroup, altsubgroup, altname = AlgorithmDecorator.getGroupsAndName(alg)
if altgroup is None:
continue
if text =="" or text.lower() in altname.lower():
if altgroup not in groups:
groups[altgroup] = {}
group = groups[altgroup]
if altsubgroup not in group:
groups[altgroup][altsubgroup] = []
subgroup = groups[altgroup][altsubgroup]
subgroup.append(alg)
if len(groups) > 0:
mainItem = QTreeWidgetItem()
mainItem.setText(0, "Geoalgorithms")
mainItem.setIcon(0, GeoAlgorithm.getDefaultIcon())
mainItem.setToolTip(0, mainItem.text(0))
for groupname, group in groups.items():
groupItem = QTreeWidgetItem()
groupItem.setText(0, groupname)
groupItem.setIcon(0, GeoAlgorithm.getDefaultIcon())
groupItem.setToolTip(0, groupItem.text(0))
mainItem.addChild(groupItem)
for subgroupname, subgroup in group.items():
subgroupItem = QTreeWidgetItem()
subgroupItem.setText(0, subgroupname)
subgroupItem.setIcon(0, GeoAlgorithm.getDefaultIcon())
subgroupItem.setToolTip(0, subgroupItem.text(0))
groupItem.addChild(subgroupItem)
for alg in subgroup:
algItem = TreeAlgorithmItem(alg)
subgroupItem.addChild(algItem)
self.algorithmTree.addTopLevelItem(mainItem)
for providerName in Sextante.algs.keys():
groups = {}
provider = Sextante.algs[providerName]
name = "ACTIVATE_" + providerName.upper().replace(" ", "_")
if not SextanteConfig.getSetting(name):
continue
if providerName not in providersToExclude:
continue
algs = provider.values()
#add algorithms
for alg in algs:
if not alg.showInToolbox:
continue
if text =="" or text.lower() in alg.name.lower():
if alg.group in groups:
groupItem = groups[alg.group]
else:
groupItem = QTreeWidgetItem()
groupItem.setText(0, alg.group)
groupItem.setToolTip(0, alg.group)
groups[alg.group] = groupItem
algItem = TreeAlgorithmItem(alg)
groupItem.addChild(algItem)
actions = Sextante.actions[providerName]
for action in actions:
if text =="" or text.lower() in action.name.lower():
if action.group in groups:
groupItem = groups[action.group]
else:
groupItem = QTreeWidgetItem()
groupItem.setText(0,action.group)
groups[action.group] = groupItem
algItem = TreeActionItem(action)
groupItem.addChild(algItem)
if len(groups) > 0:
providerItem = QTreeWidgetItem()
providerItem.setText(0, Sextante.getProviderFromName(providerName).getDescription())
providerItem.setIcon(0, Sextante.getProviderFromName(providerName).getIcon())
providerItem.setToolTip(0, providerItem.text(0))
for groupItem in groups.values():
providerItem.addChild(groupItem)
self.algorithmTree.addTopLevelItem(providerItem)
if (text != ""):
self.algorithmTree.expandAll()
开发者ID:Hardysong,项目名称:Quantum-GIS,代码行数:99,代码来源:SextanteToolbox.py
示例14: __init__
def __init__(self, descriptionfile):
GeoAlgorithm.__init__(self)
self.descriptionFile = descriptionfile
self.defineCharacteristicsFromFile()
开发者ID:Adam-Brown,项目名称:Quantum-GIS,代码行数:4,代码来源:TauDEMAlgorithm.py
示例15: getIcon
def getIcon(self):
return GeoAlgorithm.getIcon(self)
开发者ID:carsonfarmer,项目名称:Quantum-GIS,代码行数:2,代码来源:PymorphAlgorithm.py
示例16: __init__
def __init__(self, process, bookmark = False):
self.process = process
self.bookmark = bookmark
GeoAlgorithm.__init__(self) #calls defineCharacteristics
开发者ID:bpross-52n,项目名称:qgis-wps-client,代码行数:4,代码来源:WpsAlgorithm.py
注:本文中的sextante.core.GeoAlgorithm.GeoAlgorithm类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论