Esempio n. 1
0
    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 = []
Esempio n. 2
0
 def __init__(self, descriptionfile):
     GeoAlgorithm.__init__(self)
     self.roiFile = None
     self.descriptionFile = descriptionfile
     self.defineCharacteristicsFromFile()
     self.numExportedLayers = 0
     self.hasROI = None
    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 = []
Esempio n. 4
0
 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 = []
Esempio n. 5
0
 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 = []
Esempio n. 6
0
    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 = []
Esempio n. 7
0
 def __init__(self, descriptionfile):
     GeoAlgorithm.__init__(self)
     self.roiFile = None
     self.descriptionFile = descriptionfile
     self.defineCharacteristicsFromFile()
     self.numExportedLayers = 0
     self.hasROI = None;
Esempio n. 8
0
    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 = []
Esempio n. 9
0
 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()
Esempio n. 10
0
 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, 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()
Esempio n. 12
0
 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()
Esempio n. 13
0
 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()
Esempio n. 14
0
 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()
Esempio n. 15
0
 def __init__(self, descriptionfile):
     GeoAlgorithm.__init__(self)
     self.descriptionFile = descriptionfile
     self.defineCharacteristicsFromFile()
Esempio n. 16
0
 def __init__(self, descriptionfile):
     GeoAlgorithm.__init__(self)
     self.descriptionFile = descriptionfile
     self.defineCharacteristicsFromFile()
Esempio n. 17
0
 def __init__(self, process, bookmark=False):
     self.process = process
     self.bookmark = bookmark
     GeoAlgorithm.__init__(self)  #calls defineCharacteristics
Esempio n. 18
0
 def __init__(self, process, bookmark = False):
     self.process = process
     self.bookmark = bookmark
     GeoAlgorithm.__init__(self) #calls defineCharacteristics