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 = []
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.hardcodedStrings = [] self.allowUnmatchingGridExtents = False self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile() self._icon = None
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.hardcodedStrings = [] self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile() self.numExportedLayers = 0 self._icon = None
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.roiFile = None self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile() self.numExportedLayers = 0 self.hasROI = None;
def __init__(self, descriptionFile): self.descriptionFile = descriptionFile with open(self.descriptionFile) as f: self.description = json.load(f) GeoAlgorithm.__init__(self) self._group = '' self._name = ''
def __init__(self): self.slotOsmParser = SLOT("osmParser()") self.FILE = 'FILE' self.TABLE = 'TABLE' GeoAlgorithm.__init__(self)
def __init__(self): self.NAME_FILE = 'NAME' self.OUTPUT_INI = 'INI' self.__queries = {} self.__names = [] GeoAlgorithm.__init__(self)
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()
def __init__(self): self.FIELD_KEY = 'FIELD_KEY' self.FIELD_VALUE = 'FIELD_VALUE' self.FIELD_EXTENT = 'FIELD_EXTENT' self.FIELD_NOMINATIM = 'FIELD_NOMINATIM' self.FIELD_OSM_OBJECTS = 'FIELD_OSM_OBJECTS' self.FIELD_TIMEOUT = 'FIELD_TIMEOUT' self.OUTPUT_QUERY = 'OUTPUT_QUERY' GeoAlgorithm.__init__(self)
def __init__(self): GeoAlgorithm.__init__(self) # holds the algorithm object, the mode (normal or batch) and instructions self._steps = list() self.name = '' self.group = '' self.descriptionFile = None self.parameters = [ParameterString("Info", "Workflow can not be run as a batch process. Please close this dialog and execute as a normal process.", "", False)] self.showInModeler = False
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()
def __init__(self): self.INI_FILE_PATH = 'QUERY_FILE' self.LAYERS = ['multipolygons', 'multilinestrings', 'lines', 'points'] self.WHITE_LIST = {} for layer in self.LAYERS: self.WHITE_LIST[layer] = 'WHITE_LIST_' + layer GeoAlgorithm.__init__(self)
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()
def __init__(self): self.name = self.tr('Model', 'ModelerAlgorithm') # The dialog where this model is being edited self.modelerdialog = None self.descriptionFile = None self.helpContent = {} # Geoalgorithms in this model. A dict of Algorithm objects, with names as keys self.algs = {} # Input parameters. A dict of Input objects, with names as keys self.inputs = {} GeoAlgorithm.__init__(self)
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.hardcodedStrings = [] self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile() self.numExportedLayers = 0 self.uniqueSufix = unicode(uuid.uuid4()).replace('-', '') # Use the ext mechanism name = self.commandLineName().replace('.', '_')[len('grass7:'):] try: self.module = importlib.import_module('processing.algs.grass7.ext.' + name) except ImportError: self.module = None
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.hardcodedStrings = [] self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile() self.numExportedLayers = 0 self._icon = None self.uniqueSufix = str(uuid.uuid4()).replace('-', '') # Use the ext mechanism name = self.commandLineName().replace('.', '_')[len('grass7:'):] try: self.module = importlib.import_module('processing.algs.grass7.ext.' + name) except ImportError: self.module = None
def __init__(self): self.slotOsmParser = SLOT("osmParser()") self.FILE = 'FILE' self.LAYERS = ['multipolygons', 'multilinestrings', 'lines', 'points'] self.WHITE_LIST = {} self.OUTPUT_LAYERS = {} for layer in self.LAYERS: self.WHITE_LIST[layer] = 'WHITE_LIST_' + layer self.OUTPUT_LAYERS[layer] = layer + "_LAYER" self.progress = None GeoAlgorithm.__init__(self)
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()
def __init__(self): self.slotOsmParser = SLOT("osmParser()") self.FILE = 'FILE' self.LAYERS = ['multipolygons', 'multilinestrings', 'lines', 'points'] self.WHITE_LIST = {} self.OUTPUT_LAYERS = {} for layer in self.LAYERS: self.WHITE_LIST[layer] = 'WHITE_LIST_' + layer self.OUTPUT_LAYERS[layer] = layer + "_LAYER" self.progress = None GeoAlgorithm.__init__(self)
def __init__(self, compoundname, compoundgroup, thememap=False, fractileplot=False, depthplot=False, scatterplot=False): self.compoundname = compoundname self.compoundgroup = compoundgroup self.thememap = thememap self.fractileplot = fractileplot self.depthplot = depthplot self.scatterplot = scatterplot GeoAlgorithm.__init__(self)
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._icon = QIcon(os.path.join(pluginPath, 'images', 'script.png')) self.script = script self.allowEdit = True self.noCRSWarning = False self.descriptionFile = descriptionFile if script is not None: self.defineCharacteristicsFromScript() if descriptionFile is not None: self.defineCharacteristicsFromFile()
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._icon = QgsApplication.getThemeIcon("/processingScript.svg") self.script = script self.allowEdit = True self.noCRSWarning = False self.descriptionFile = descriptionFile if script is not None: self.defineCharacteristicsFromScript() if descriptionFile is not None: self.defineCharacteristicsFromFile()
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._icon = QIcon(os.path.join(pluginPath, 'images', 'script.png')) self.script = script self.allowEdit = True self.noCRSWarning = False self.descriptionFile = descriptionFile if script is not None: self.defineCharacteristicsFromScript() if descriptionFile is not None: self.defineCharacteristicsFromFile()
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._icon = QgsApplication.getThemeIcon("/processingScript.svg") self.script = script self.allowEdit = True self.noCRSWarning = False self.descriptionFile = descriptionFile if script is not None: self.defineCharacteristicsFromScript() if descriptionFile is not None: self.defineCharacteristicsFromFile()
def __init__(self): self._name = self.tr('Model', 'ModelerAlgorithm') # The dialog where this model is being edited self.modelerdialog = None self.descriptionFile = None self.helpContent = {} self._group = '' # Geoalgorithms in this model. A dict of Algorithm objects, with names as keys self.algs = {} # Input parameters. A dict of Input objects, with names as keys self.inputs = {} GeoAlgorithm.__init__(self) classes = [ ParameterRaster, ParameterVector, ParameterTable, ParameterTableField, ParameterBoolean, ParameterString, ParameterNumber ] self.parameters = [] for c in classes: for inp in list(self.inputs.values()): if isinstance(inp.param, c): self.parameters.append(inp.param) for inp in list(self.inputs.values()): if inp.param not in self.parameters: self.parameters.append(inp.param) self.parameters.sort(key=attrgetter("description")) self.outputs = [] for alg in list(self.algs.values()): if alg.active: for out in alg.outputs: modelOutput = copy.deepcopy( alg.algorithm.getOutputFromName(out)) modelOutput.name = self.getSafeNameForOutput( alg.modeler_name, out) modelOutput.description = alg.outputs[out].description() self.outputs.append(modelOutput) self.outputs.sort(key=attrgetter("description"))
def __init__(self, gpfAlgorithmProvider): self.name = self.tr('GpfModel', 'GpfModelerAlgorithm') # The dialog where this model is being edited self.modelerdialog = None self.descriptionFile = None self.helpContent = {} # Geoalgorithms in this model. A dict of Algorithm objects, with names as keys self.algs = {} #Input parameters. A dict of Input objects, with names as keys self.inputs = {} # NOTE: # This doesn't seem used so remove it later from BEAMParmetersPanel and S1TbxAlgorithm self.multipleRasterInput = False GeoAlgorithm.__init__(self) self.provider = gpfAlgorithmProvider self.programKey = GPFUtils.getKeyFromProviderName( self.provider.getName())
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 # explicitly 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 = [] self.outputPos = [] # same structure as algOutputs # Deactivated algorithms that should not be executed self.deactivated = []
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 # explicitly 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 = [] self.outputPos = [] # same structure as algOutputs # Deactivated algorithms that should not be executed self.deactivated = []
def __init__(self): self._name = self.tr('Model', 'ModelerAlgorithm') # The dialog where this model is being edited self.modelerdialog = None self.descriptionFile = None self.helpContent = {} self._group = '' # Geoalgorithms in this model. A dict of Algorithm objects, with names as keys self.algs = {} # Input parameters. A dict of Input objects, with names as keys self.inputs = {} GeoAlgorithm.__init__(self) classes = [ParameterRaster, ParameterVector, ParameterTable, ParameterTableField, ParameterBoolean, ParameterString, ParameterNumber] self.parameters = [] for c in classes: for inp in list(self.inputs.values()): if isinstance(inp.param, c): self.parameters.append(inp.param) for inp in list(self.inputs.values()): if inp.param not in self.parameters: self.parameters.append(inp.param) self.parameters.sort(key=attrgetter("description")) self.outputs = [] for alg in list(self.algs.values()): if alg.active: for out in alg.outputs: modelOutput = copy.deepcopy(alg.algorithm.getOutputFromName(out)) modelOutput.name = self.getSafeNameForOutput(alg.modeler_name, out) modelOutput.description = alg.outputs[out].description() self.outputs.append(modelOutput) self.outputs.sort(key=attrgetter("description"))
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.hardcodedStrings = [] self.allowUnmatchingGridExtents = False self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile()
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use Centroids instead self.showInToolbox = False
def __init__(self): GeoAlgorithm.__init__(self) self.showInModeler = False
def __init__(self): self._translateUi() GeoAlgorithm.__init__(self)
def __init__(self): GeoAlgorithm.__init__(self) self.exportedLayers = {}
def __init__(self): GeoAlgorithm.__init__(self) self._icon = None
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use GridPolygon instead self.showInToolbox = False
def __init__(self): GeoAlgorithm.__init__(self) self.mapping = None
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use SplitWithLines instead self.showInToolbox = False
def __init__(self, descriptionFile): self.descriptionFile = descriptionFile with open(self.descriptionFile) as f: self.description = json.load(f) GeoAlgorithm.__init__(self)
def __init__(self): self.configParser = ConfigParser() self.configParser.read(os.path.dirname(__file__) + "/COLOR_SCHEMA.ini") self.availableColorSchemas = self.configParser.sections() GeoAlgorithm.__init__(self)
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use Centroids instead self.showInToolbox = False
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use SplitWithLines instead self.showInToolbox = False
def __init__(self): self.allowUnmatchingGridExtents = True self.hardcodedStrings = [] GeoAlgorithm.__init__(self)
def __init__(self, process, bookmark=False): self.process = process self.bookmark = bookmark GeoAlgorithm.__init__(self) #calls defineCharacteristics
def __init__(self): GeoAlgorithm.__init__(self)
def __init__(self): GeoAlgorithm.__init__(self)
def __init__(self): GeoAlgorithm.__init__(self) self.showInModeler = False
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use BasicStatistics instead self.showInToolbox = False
def __init__(self, tablename, groupname): self.tablename = tablename self.groupname = groupname GeoAlgorithm.__init__(self)
def __init__(self): GeoAlgorithm.__init__(self) self._icon = None
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use GridPolygon instead self.showInToolbox = False
def __init__(self): GeoAlgorithm.__init__(self) # this algorithm is deprecated - use BasicStatistics instead self.showInToolbox = False
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile() self.numExportedLayers = 0
def __init__(self, descriptionfile): GeoAlgorithm.__init__(self) self.descriptionFile = descriptionfile self.defineCharacteristicsFromFile() self._icon = None
def __init__(self): GeoAlgorithm.__init__(self) self.pluginDir = os.path.dirname(os.path.realpath(__file__)) self._load_translations()
def __init__(self): GeoAlgorithm.__init__(self) self.mapping = None
def __init__(self, compoundname, compoundgroup): self.compoundname = compoundname self.compoundgroup = compoundgroup GeoAlgorithm.__init__(self)