示例#1
0
    def defineCharacteristics(self):
        self.name = 'Import into PostGIS'
        self.group = 'Database'
        self.addParameter(ParameterVector(self.INPUT, 'Layer to import'))

        self.DB_CONNECTIONS = self.dbConnectionNames()
        self.addParameter(
            ParameterSelection(self.DATABASE, 'Database (connection name)',
                               self.DB_CONNECTIONS))

        self.addParameter(ParameterString(self.SCHEMA, 'Schema (schema name)'))
        self.addParameter(ParameterString(self.TABLENAME,
                                          'Table to import to'))
        self.addParameter(
            ParameterTableField(self.PRIMARY_KEY,
                                'Primary key field',
                                self.INPUT,
                                optional=True))
        self.addParameter(
            ParameterString(self.GEOMETRY_COLUMN, 'Geometry column',
                            'the_geom'))
        self.addParameter(ParameterBoolean(self.OVERWRITE, 'Overwrite', True))
        self.addParameter(
            ParameterBoolean(self.CREATEINDEX, 'Create spatial index', True))
        self.addParameter(
            ParameterBoolean(self.LOWERCASE_NAMES,
                             'Convert field names to lowercase', False))
        self.addParameter(
            ParameterBoolean(self.DROP_STRING_LENGTH,
                             'Drop length constraints on character fields',
                             False))
示例#2
0
 def defineCharacteristics(self):
     self.name = 'Advanced Python field calculator'
     self.group = 'Vector table tools'
     self.addParameter(
         ParameterVector(self.INPUT_LAYER, 'Input layer',
                         [ParameterVector.VECTOR_TYPE_ANY], False))
     self.addParameter(
         ParameterString(self.FIELD_NAME, 'Result field name', 'NewField'))
     self.addParameter(
         ParameterSelection(self.FIELD_TYPE, 'Field type', self.TYPE_NAMES))
     self.addParameter(
         ParameterNumber(self.FIELD_LENGTH, 'Field length', 1, 255, 10))
     self.addParameter(
         ParameterNumber(self.FIELD_PRECISION, 'Field precision', 0, 10, 0))
     self.addParameter(
         ParameterString(self.GLOBAL,
                         'Global expression',
                         multiline=True,
                         optional=True))
     self.addParameter(
         ParameterString(self.FORMULA,
                         'Formula',
                         'value = ',
                         multiline=True))
     self.addOutput(OutputVector(self.OUTPUT_LAYER, 'Output layer'))
示例#3
0
 def defineCharacteristics(self):
     self.name = 'Translate (convert format)'
     self.group = '[GDAL] Conversion'
     self.addParameter(ParameterRaster(self.INPUT, 'Input layer',
                       False))
     self.addParameter(ParameterNumber(self.OUTSIZE,
                       'Set the size of the output file (In pixels or %)',
                       1, None, 100))
     self.addParameter(ParameterBoolean(self.OUTSIZE_PERC,
                       'Output size is a percentage of input size', True))
     self.addParameter(ParameterString(self.NO_DATA,
         'Nodata value, leave as none to take the nodata value from input',
         'none'))
     self.addParameter(ParameterSelection(self.EXPAND, 'Expand',
                       ['none', 'gray', 'rgb', 'rgba']))
     self.addParameter(ParameterCrs(self.SRS,
                       'Override the projection for the output file', None))
     self.addParameter(ParameterExtent(self.PROJWIN,
                       'Subset based on georeferenced coordinates'))
     self.addParameter(ParameterBoolean(self.SDS,
         'Copy all subdatasets of this file to individual output files',
         False))
     self.addParameter(ParameterString(self.EXTRA,
                       'Additional creation parameters', ''))
     self.addOutput(OutputRaster(self.OUTPUT, 'Output layer'))
示例#4
0
 def defineCharacteristics(self):
     self.addBaseParameters()
     self.name = "Create workspace"
     self.group = "GeoServer management tools"
     self.addParameter(ParameterString(self.WORKSPACE, "Workspace"))
     self.addParameter(ParameterString(self.WORKSPACEURI, "Workspace URI"))
     self.addOutput(OutputString(self.WORKSPACE, "Workspace"))
示例#5
0
 def defineCharacteristics(self):
     self.addBaseParameters()
     self.name = 'Create workspace'
     self.group = 'GeoServer management tools'
     self.addParameter(ParameterString(self.WORKSPACE, 'Workspace'))
     self.addParameter(ParameterString(self.WORKSPACEURI, 'Workspace URI'))
     self.addOutput(OutputString(self.WORKSPACE, 'Workspace'))
示例#6
0
 def addBaseParameters(self):
     self.addParameter(
         ParameterString(self.URL, "URL",
                         "http://localhost:8080/geoserver/rest"))
     self.addParameter(ParameterString(self.USER, "User", "admin"))
     self.addParameter(
         ParameterString(self.PASSWORD, "Password", "geoserver"))
示例#7
0
 def defineCharacteristics(self):
     self.addBaseParameters()
     self.name = "Import raster into GeoServer"
     self.group = "GeoServer management tools"
     self.addParameter(ParameterRaster(self.INPUT, "Layer to import"))
     self.addParameter(ParameterString(self.WORKSPACE, "Workspace"))
     self.addParameter(ParameterString(self.NAME, "Store name"))
示例#8
0
 def addBaseParameters(self):
     self.addParameter(
         ParameterString(self.URL, 'URL',
                         'http://localhost:8080/geoserver/rest'))
     self.addParameter(ParameterString(self.USER, 'User', 'admin'))
     self.addParameter(
         ParameterString(self.PASSWORD, 'Password', 'geoserver'))
示例#9
0
 def defineCharacteristics(self):
     self.name = 'Canopy Model'
     self.group = 'Points'
     self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
     self.addParameter(ParameterNumber(self.CELLSIZE, 'Cellsize', 0, None, 10.0))
     self.addParameter(ParameterSelection(self.XYUNITS, 'XY Units', self.UNITS))
     self.addParameter(ParameterSelection(self.ZUNITS, 'Z Units', self.UNITS))
     self.addOutput(OutputFile(self.OUTPUT_DTM, 'DTM Output Surface', 'dtm'))
     ground = ParameterFile(self.GROUND, 'Input ground DTM layer', False, True)
     ground.isAdvanced = True
     self.addParameter(ground)
     median = ParameterString(self.MEDIAN, 'Median', '', False, True)
     median.isAdvanced = True
     self.addParameter(median)
     smooth = ParameterString(self.SMOOTH, 'Smooth', '', False, True)
     smooth.isAdvanced = True
     self.addParameter(smooth)
     slope = ParameterString(self.SLOPE, 'Slope', '', False, True)
     slope.isAdvanced = True
     self.addParameter(slope)
     class_var = ParameterString(self.CLASS, 'Class', '', False, True)
     class_var.isAdvanced = True
     self.addParameter(class_var)
     advance_modifiers = ParameterString(self.ADVANCED_MODIFIERS, 'Additional modifiers', '', False, True)
     advance_modifiers.isAdvanced = True
     self.addParameter(advance_modifiers)
 def defineCharacteristics(self):
     self.addBaseParameters()
     self.name = 'Import raster into GeoServer'
     self.group = 'GeoServer management tools'
     self.addParameter(ParameterRaster(self.INPUT, 'Layer to import'))
     self.addParameter(ParameterString(self.WORKSPACE, 'Workspace'))
     self.addParameter(ParameterString(self.NAME, 'Store name'))
示例#11
0
 def defineCharacteristics(self):
     self.name = "Import into PostGIS"
     self.group = "PostGIS management tools"
     self.addParameter(ParameterVector(self.INPUT, "Layer to import"))
     self.addParameter(ParameterString(self.DATABASE, "Database (connection name)"))
     self.addParameter(ParameterString(self.TABLENAME, "Table to import to"))
     self.addParameter(ParameterBoolean(self.OVERWRITE, "Overwrite", True))
     self.addParameter(ParameterBoolean(self.CREATEINDEX, "Create spatial index", True))
示例#12
0
    def buildParametersDialog(self):
        for input in self.process.inputs:
            inputType = type(input)
            if inputType == VectorInput:
                self.addParameter(
                    ParameterVector(str(input.identifier), str(input.title),
                                    ParameterVector.VECTOR_TYPE_ANY,
                                    input.minOccurs == 0))
            elif inputType == MultipleVectorInput:
                self.addParameter(
                    ParameterMultipleInput(str(input.identifier),
                                           str(input.title),
                                           ParameterVector.VECTOR_TYPE_ANY,
                                           input.minOccurs == 0))
            elif inputType == StringInput:
                self.addParameter(
                    ParameterString(str(input.identifier), str(input.title)))
            elif inputType == TextInput:
                self.addParameter(
                    ParameterString(str(input.identifier), str(input.title)))
            elif inputType == RasterInput:
                self.addParameter(
                    ParameterRaster(str(input.identifier), str(input.title),
                                    input.minOccurs == 0))
            elif inputType == MultipleRasterInput:
                self.addParameter(
                    ParameterMultipleInput(str(input.identifier),
                                           str(input.title),
                                           ParameterMultipleInput.TYPE_RASTER,
                                           input.minOccurs == 0))
            elif inputType == FileInput:
                #self.addParameter(ParameterFile(str(input.identifier), str(input.title), False, input.minOccurs == 0))
                self.addParameter(
                    ParameterFile(str(input.identifier), str(input.title)))
            elif inputType == MultipleFileInput:
                pass  #Not supported
            elif inputType == SelectionInput:
                self.addParameter(
                    ParameterSelection(str(input.identifier), str(input.title),
                                       input.valList))
            elif inputType == ExtentInput:
                self.addParameter(
                    ParameterExtent(str(input.identifier), str(input.title)))
            elif inputType == CrsInput:
                self.addParameter(
                    ParameterCrs(str(input.identifier), "Projection", None))

        for output in self.process.outputs:
            outputType = type(output)
            if outputType == VectorOutput:
                self.addOutput(
                    OutputVector(str(output.identifier), str(output.title)))
            elif outputType == RasterOutput:
                self.addOutput(
                    OutputRaster(str(output.identifier), str(output.title)))
            elif outputType == StringOutput:
                self.addOutput(
                    OutputString(str(output.identifier), str(output.title)))
示例#13
0
 def defineCharacteristics(self):
     self.name = 'Tin Surface Create'
     self.group = 'Surface'
     self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
     self.addParameter(ParameterNumber(self.CELLSIZE, 'Cellsize', 0, None, 10.0))
     self.addParameter(ParameterSelection(self.XYUNITS, 'XY Units', self.UNITS))
     self.addParameter(ParameterSelection(self.ZUNITS, 'Z Units', self.UNITS))
     self.addOutput(OutputFile(self.OUTPUT_DTM, 'DTM Output Surface', 'dtm'))
     class_var = ParameterString(self.CLASS, 'Class', 2, False, True)
     class_var.isAdvanced = True
     self.addParameter(class_var)
示例#14
0
 def defineCharacteristics(self):
     self.name = "Tin Surface Create"
     self.group = "Surface"
     self.addParameter(ParameterFile(self.INPUT, "Input las layer"))
     self.addParameter(ParameterNumber(self.CELLSIZE, "Cellsize", 0, None, 10.0))
     self.addParameter(ParameterSelection(self.XYUNITS, "XY Units", self.UNITS))
     self.addParameter(ParameterSelection(self.ZUNITS, "Z Units", self.UNITS))
     self.addOutput(OutputFile(self.OUTPUT_DTM, "DTM Output Surface", "dtm"))
     class_var = ParameterString(self.CLASS, "Class", 2, False, True)
     class_var.isAdvanced = True
     self.addParameter(class_var)
示例#15
0
 def defineCharacteristics(self):
     self.name = "Advanced Python field calculator"
     self.group = "Vector table tools"
     self.addParameter(ParameterVector(self.INPUT_LAYER, "Input layer", [ParameterVector.VECTOR_TYPE_ANY], False))
     self.addParameter(ParameterString(self.FIELD_NAME, "Result field name", "NewField"))
     self.addParameter(ParameterSelection(self.FIELD_TYPE, "Field type", self.TYPE_NAMES))
     self.addParameter(ParameterNumber(self.FIELD_LENGTH, "Field length", 1, 255, 10))
     self.addParameter(ParameterNumber(self.FIELD_PRECISION, "Field precision", 0, 10, 0))
     self.addParameter(ParameterString(self.GLOBAL, "Global expression", multiline = True, optional = True))
     self.addParameter(ParameterString(self.FORMULA, "Formula", "value = ", multiline = True))
     self.addOutput(OutputVector(self.OUTPUT_LAYER, "Output layer"))
示例#16
0
 def defineCharacteristics(self):
     self.name = 'Import into PostGIS'
     self.group = 'PostGIS management tools'
     self.addParameter(ParameterVector(self.INPUT, 'Layer to import'))
     self.addParameter(ParameterString(self.DATABASE,
                       'Database (connection name)'))
     self.addParameter(ParameterString(self.SCHEMA, 'Schema (schema name)'))
     self.addParameter(ParameterString(self.TABLENAME, 'Table to import to'
                       ))
     self.addParameter(ParameterBoolean(self.OVERWRITE, 'Overwrite', True))
     self.addParameter(ParameterBoolean(self.CREATEINDEX,
                       'Create spatial index', True))
示例#17
0
 def defineCharacteristics(self):
     self.name = 'Clip raster by extent'
     self.group = '[GDAL] Extraction'
     self.addParameter(ParameterRaster(self.INPUT, 'Input layer', False))
     self.addParameter(
         ParameterString(
             self.NO_DATA,
             'Nodata value, leave as none to take the nodata value from input',
             'none'))
     self.addParameter(ParameterExtent(self.PROJWIN, 'Clipping extent'))
     self.addParameter(
         ParameterString(self.EXTRA, 'Additional creation parameters', ''))
     self.addOutput(OutputRaster(self.OUTPUT, 'Output layer'))
示例#18
0
 def defineCharacteristics(self):
     self.name = 'Tin Surface Create'
     self.group = 'Surface'
     self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
     self.addParameter(ParameterNumber(self.CELLSIZE, 'Cellsize', 0, None, 10.0))
     self.addParameter(ParameterSelection(self.XYUNITS, 'XY Units', self.UNITS))
     self.addParameter(ParameterSelection(self.ZUNITS, 'Z Units', self.UNITS))
     self.addOutput(OutputFile(self.OUTPUT_DTM, 'DTM Output Surface'))
     self.addOutput(OutputFile(self.OUTPUT_ASCII, 'ASCII Output Surface'))
     self.addParameter(ParameterBoolean(self.ASCII, 'ASCII Output?'))  
     class_var = ParameterString(self.CLASS, 'Class - If multiple, separated by comma (set blank if not used)', 2, False, True)
     class_var.isAdvanced = True
     self.addParameter(class_var)
示例#19
0
 def defineCharacteristics(self):
     self.name = "Translate (convert format)"
     self.group = "[GDAL] Conversion"
     self.addParameter(ParameterRaster(translate.INPUT, "Input layer", False))
     self.addParameter(ParameterNumber(translate.OUTSIZE, "Set the size of the output file (In pixels or %)", 1, None, 100))
     self.addParameter(ParameterBoolean(translate.OUTSIZE_PERC, "Output size is a percentage of input size", True))
     self.addParameter(ParameterString(translate.NO_DATA, "Nodata value, leave as none to take the nodata value from input", "none"))
     self.addParameter(ParameterSelection(translate.EXPAND, "Expand", ["none","gray","rgb","rgba"]))
     self.addParameter(ParameterCrs(translate.SRS, "Override the projection for the output file", None))
     self.addParameter(ParameterExtent(translate.PROJWIN, "Subset based on georeferenced coordinates"))
     self.addParameter(ParameterBoolean(translate.SDS, "Copy all subdatasets of this file to individual output files", False))
     self.addParameter(ParameterString(translate.EXTRA, "Additional creation parameters", ""))
     self.addOutput(OutputRaster(translate.OUTPUT, "Output layer"))
示例#20
0
 def defineCharacteristics(self):
     self.name = 'lascanopy'
     self.group = 'LAStools'
     self.addParametersVerboseGUI()
     self.addParametersPointInputGUI()
     self.addParametersStepGUI()
     self.addParameter(
         ParameterNumber(lascanopy.HEIGHT_CUTOFF,
                         'height cutoff / breast height', False, False,
                         1.37))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT1, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT2, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT3, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT4, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT5, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT6, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT7, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT8, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT9, 'create',
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterString(lascanopy.COUNTS,
                         'count rasters (e.g. 2.0 5.0 10.0 20.0)', ''))
     self.addParameter(
         ParameterString(lascanopy.DENSITIES,
                         'density rasters (e.g. 2.0 5.0 10.0 20.0)', ''))
     self.addParameter(
         ParameterBoolean(
             lascanopy.USE_TILE_BB,
             'use tile bounding box (after tiling with buffer)', False))
     self.addParametersRasterOutputGUI()
示例#21
0
 def defineCharacteristics(self):
     self.name = 'Clip raster by mask layer'
     self.group = '[GDAL] Extraction'
     self.addParameter(ParameterRaster(self.INPUT, 'Input layer', False))
     self.addParameter(ParameterVector(self.MASK, 'Mask layer',
                       [ParameterVector.VECTOR_TYPE_POLYGON]))
     self.addParameter(ParameterString(self.NO_DATA,
         'Nodata value, leave as none to take the nodata value from input',
         'none'))
     self.addParameter(ParameterBoolean(self.ALPHA_BAND,
                       'Create and output alpha band', False))
     self.addParameter(ParameterBoolean(self.KEEP_RESOLUTION,
                       'Keep resolution of output raster', False))
     self.addParameter(ParameterString(self.EXTRA,
                       'Additional creation parameters', '', optional=True))
     self.addOutput(OutputRaster(self.OUTPUT, 'Output layer'))
示例#22
0
    def defineCharacteristics(self):
        self.name = 'Simulate flow in drinking water network'
        self.group = 'Simulation'

        self.addParameter(
            ParameterString(self.TITLE, 'Title', 'Epanet Simulation'))
        self.addParameter(
            ParameterVector(self.JUNCTIONS, 'Junctions layer',
                            [ParameterVector.VECTOR_TYPE_POINT]))
        self.addParameter(
            ParameterVector(self.PIPES, 'Pipes layer',
                            [ParameterVector.VECTOR_TYPE_LINE]))
        self.addParameter(
            ParameterVector(self.RESERVOIRS, 'Reservoir layer',
                            [ParameterVector.VECTOR_TYPE_POINT], True))
        self.addParameter(
            ParameterVector(self.TANKS, 'Tanks layer',
                            [ParameterVector.VECTOR_TYPE_POINT], True))
        self.addParameter(
            ParameterVector(self.PUMPS, 'Pumps layer',
                            [ParameterVector.VECTOR_TYPE_POINT], True))
        self.addParameter(
            ParameterVector(self.VALVES, 'Valves layer',
                            [ParameterVector.VECTOR_TYPE_POINT], True))
        self.addParameter(
            ParameterVector(self.EMITTERS, 'Emiters layer',
                            [ParameterVector.VECTOR_TYPE_POINT], True))
        self.addParameter(ParameterTable(self.DEMANDS, 'Demands   table',
                                         True))
        self.addParameter(ParameterTable(self.STATUS, 'Status    table', True))
        self.addParameter(
            ParameterTable(self.PATTERNS, 'Patterns  table', True))
        self.addParameter(ParameterTable(self.CURVES, 'Curves    table', True))
        self.addParameter(
            ParameterTable(self.CONTROLS, 'Controls  table', True))
        self.addParameter(ParameterTable(self.QUALITY, 'Quality   table',
                                         True))
        self.addParameter(ParameterTable(self.MIXING, 'Mixing    table', True))

        #self.addParameter(ParameterFile(self.ADDITIONAL_FILE, 'Epanet config file'))
        self.addParameter(ParameterTable(self.TIMES, 'Simulation Time'))
        self.addParameter(ParameterTable(self.RULES, 'Control rules', True))
        self.addParameter(ParameterTable(self.ENERGY, 'Energy ', True))
        self.addParameter(ParameterTable(self.REACTIONS, 'Reaction', True))
        self.addParameter(ParameterTable(self.REPORT, 'Report options', True))
        self.addParameter(ParameterTable(self.OPTIONS, 'Options', True))

        #self.addOutput(OutputVector(self.NODE_OUTPUT, 'Node output layer'))
        #self.addOutput(OutputVector(self.LINK_OUTPUT, 'Link output layer'))
        self.addOutput(
            EpanetOutputTable(self.NODE_TABLE_OUTPUT, 'Node output table'))
        self.addOutput(
            EpanetOutputTable(self.LINK_TABLE_OUTPUT, 'Link output table'))
        self.addOutput(
            EpanetOutputTable(self.TIME_AGREGATE_NODE_TABLE_OUTPUT,
                              'Node output table (time agregates)'))
        self.addOutput(
            EpanetOutputTable(self.TIME_AGREGATE_LINK_TABLE_OUTPUT,
                              'Link output table (time agregates)'))
        pass
示例#23
0
 def addParametersPointInputFolderGUI(self):
     self.addParameter(
         ParameterFile(LAStoolsAlgorithm.INPUT_DIRECTORY, "input directory",
                       True))
     self.addParameter(
         ParameterString(LAStoolsAlgorithm.INPUT_WILDCARDS,
                         "input wildcard(s)", "*.laz"))
示例#24
0
 def defineCharacteristics(self):
     self.name = 'Eliminate sliver polygons'
     self.group = 'Vector geometry tools'
     self.addParameter(ParameterVector(self.INPUT, 'Input layer',
                       [ParameterVector.VECTOR_TYPE_POLYGON]))
     self.addParameter(ParameterBoolean(self.KEEPSELECTION,
                       'Use current selection in input layer (works only \
                       if called from toolbox)', False))
     self.addParameter(ParameterTableField(self.ATTRIBUTE,
                       'Selection attribute', self.INPUT))
     self.comparisons = [
         '==',
         '!=',
         '>',
         '>=',
         '<',
         '<=',
         'begins with',
         'contains',
         ]
     self.addParameter(ParameterSelection(self.COMPARISON, 'Comparison',
                       self.comparisons, default=0))
     self.addParameter(ParameterString(self.COMPARISONVALUE, 'Value',
                       default='0'))
     self.addParameter(ParameterSelection(self.MODE,
                       'Merge selection with the neighbouring polygon \
                       with the largest', self.MODES))
     self.addOutput(OutputVector(self.OUTPUT, 'Cleaned layer'))
示例#25
0
 def defineCharacteristics(self):
     self.addBaseParameters()
     self.name = "Add style"
     self.group = "GeoServer management tools"
     self.addParameter(ParameterString(self.NAME, "Style name"))
     self.addParameter(ParameterFile(self.STYLE, "Style SLD file"))
     self.addParameter(ParameterBoolean(self.OVERWRITE, "Overwrite"))
示例#26
0
    def defineCharacteristics(self):
        self.name = 'Pairwise modelling'
        self.group = 'Circuitscape'

        self.addParameter(
            ParameterRaster(self.RESISTANCE_MAP, 'Raster resistance map'))
        self.addParameter(
            ParameterBoolean(
                self.IS_CONDUCTANCES,
                'Data represent conductances instead of resistances', False))
        self.addParameter(
            ParameterRaster(self.FOCAL_NODE, 'Focal node location'))
        self.addParameter(
            ParameterBoolean(self.WRITE_CURRENT_MAP, 'Create current map',
                             True))
        self.addParameter(
            ParameterBoolean(self.WRITE_VOLTAGE_MAP, 'Create voltage map',
                             True))
        self.addParameter(
            ParameterRaster(self.MASK, 'Raster mask file', optional=True))
        self.addParameter(
            ParameterRaster(self.SHORT_CIRCUIT,
                            'Raster short-circuit region file',
                            optional=True))
        self.addParameter(
            ParameterRaster(self.EXCLUDE_INCLUDE,
                            'File with focal node pairs to exclude/include',
                            optional=True))
        self.addParameter(
            ParameterBoolean(self.LOW_MEMORY, 'Run in low memory mode', False))

        self.addParameter(
            ParameterString(self.BASENAME, 'Output basename', 'csoutput'))

        self.addOutput(OutputDirectory(self.DIRECTORY, 'Output directory'))
示例#27
0
 def defineCharacteristics(self):
     self.name = 'Field calculator'
     self.group = 'Vector table tools'
     self.addParameter(
         ParameterVector(self.INPUT_LAYER, 'Input layer',
                         [ParameterVector.VECTOR_TYPE_ANY], False))
     self.addParameter(ParameterString(self.FIELD_NAME,
                                       'Result field name'))
     self.addParameter(
         ParameterSelection(self.FIELD_TYPE, 'Field type', self.TYPE_NAMES))
     self.addParameter(
         ParameterNumber(self.FIELD_LENGTH, 'Field length', 1, 255, 10))
     self.addParameter(
         ParameterNumber(self.FIELD_PRECISION, 'Field precision', 0, 10, 5))
     self.addParameter(ParameterString(self.FORMULA, 'Formula'))
     self.addOutput(OutputVector(self.OUTPUT_LAYER, 'Output layer'))
示例#28
0
 def defineCharacteristics(self):
     self.addBaseParameters()
     self.name = 'Add style'
     self.group = 'GeoServer management tools'
     self.addParameter(ParameterString(self.NAME, 'Style name'))
     self.addParameter(ParameterFile(self.STYLE, 'Style SLD file'))
     self.addParameter(ParameterBoolean(self.OVERWRITE, 'Overwrite'))
示例#29
0
    def defineCharacteristics(self):
        self.name = 'One-to-all / All-to-one modelling'
        self.group = 'Circuitscape'

        self.addParameter(
            ParameterSelection(self.MODE, 'Modelling mode', self.MODES, 0))
        self.addParameter(
            ParameterRaster(self.RESISTANCE_MAP, 'Raster resistance map'))
        self.addParameter(
            ParameterBoolean(
                self.IS_CONDUCTANCES,
                'Data represent conductances instead of resistances', False))
        self.addParameter(
            ParameterRaster(self.FOCAL_NODE, 'Focal node location'))
        self.addParameter(
            ParameterBoolean(self.WRITE_CURRENT_MAP, 'Create current map',
                             True))
        self.addParameter(
            ParameterBoolean(self.WRITE_VOLTAGE_MAP, 'Create voltage map',
                             True))
        self.addParameter(
            ParameterRaster(self.MASK, 'Raster mask file', optional=True))
        self.addParameter(
            ParameterRaster(self.SHORT_CIRCUIT,
                            'Raster short-circuit region file',
                            optional=True))
        self.addParameter(
            ParameterRaster(self.SOURCE_STRENGTH,
                            'Source strength file',
                            optional=True))

        self.addParameter(
            ParameterString(self.BASENAME, 'Output basename', 'csoutput'))

        self.addOutput(OutputDirectory(self.DIRECTORY, 'Output directory'))
示例#30
0
 def defineCharacteristics(self):
     self.name = "las2txt"
     self.group = "LAStools"
     self.addParametersVerboseGUI()
     self.addParametersPointInputGUI()
     self.addParameter(ParameterString(las2txt.PARSE_STRING, "parse_string", "xyz"))
     self.addOutput(OutputFile(las2txt.OUTPUT, "Output ASCII file"))
示例#31
0
 def defineCharacteristics(self):
     self.name = "flightlinesToDTMandDSM"
     self.group = "LAStools Pipelines"
     self.addParametersPointInputFolderGUI()
     self.addParameter(
         ParameterNumber(flightlinesToDTMandDSM.TILE_SIZE,
                         "tile size (side length of square tile)", 0, None,
                         1000.0))
     self.addParameter(
         ParameterNumber(flightlinesToDTMandDSM.BUFFER,
                         "buffer around each tile (avoids edge artifacts)",
                         0, None, 25.0))
     self.addParameter(
         ParameterSelection(flightlinesToDTMandDSM.TERRAIN, "terrain type",
                            flightlinesToDTMandDSM.TERRAINS, 1))
     self.addParametersStepGUI()
     self.addParametersTemporaryDirectoryGUI()
     self.addParametersOutputDirectoryGUI()
     self.addParameter(
         ParameterString(
             flightlinesToDTMandDSM.BASE_NAME,
             "tile base name (using 'sydney' creates sydney_274000_4714000...)",
             "tile"))
     self.addParametersRasterOutputFormatGUI()
     self.addParametersCoresGUI()
     self.addParametersVerboseGUI()
示例#32
0
    def defineCharacteristics(self):
        self.name = 'Contour'
        self.group = '[GDAL] Extraction'
        self.addParameter(ParameterRaster(self.INPUT_RASTER, 'Input layer',
                          False))
        self.addParameter(ParameterNumber(self.INTERVAL,
                          'Interval between contour lines', 0.0,
                          99999999.999999, 10.0))
        self.addParameter(ParameterString(self.FIELD_NAME,
            'Attribute name (if not set, no elevation attribute is attached)',
            'ELEV', optional=True))
        self.addParameter(ParameterString(self.EXTRA,
                          'Additional creation parameters', '', optional=True))

        self.addOutput(OutputVector(self.OUTPUT_VECTOR,
                       'Output file for contour lines (vector)'))
示例#33
0
 def defineCharacteristics(self):
     self.name = "Field calculator"
     self.group = "Vector table tools"
     self.addParameter(
         ParameterVector(self.INPUT_LAYER, "Input layer",
                         [ParameterVector.VECTOR_TYPE_ANY], False))
     self.addParameter(ParameterString(self.FIELD_NAME,
                                       "Result field name"))
     self.addParameter(
         ParameterSelection(self.FIELD_TYPE, "Field type", self.TYPE_NAMES))
     self.addParameter(
         ParameterNumber(self.FIELD_LENGTH, "Field length", 1, 255, 10))
     self.addParameter(
         ParameterNumber(self.FIELD_PRECISION, "Field precision", 0, 10, 5))
     self.addParameter(ParameterString(self.FORMULA, "Formula"))
     self.addOutput(OutputVector(self.OUTPUT_LAYER, "Output layer"))
示例#34
0
 def defineCharacteristics(self):
     self.name = "lascanopy"
     self.group = "LAStools"
     self.addParametersVerboseGUI()
     self.addParametersPointInputGUI()
     self.addParametersStepGUI()
     self.addParameter(
         ParameterNumber(lascanopy.HEIGHT_CUTOFF,
                         "height cutoff / breast height", 0, None, 1.37))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT1, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT2, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT3, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT4, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT5, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT6, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT7, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT8, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterSelection(lascanopy.PRODUCT9, "create",
                            lascanopy.PRODUCTS, 0))
     self.addParameter(
         ParameterString(lascanopy.COUNTS,
                         "count rasters (e.g. 2.0 5.0 10.0 20.0)", ""))
     self.addParameter(
         ParameterString(lascanopy.DENSITIES,
                         "density rasters (e.g. 2.0 5.0 10.0 20.0)", ""))
     self.addParameter(
         ParameterBoolean(
             lascanopy.USE_TILE_BB,
             "use tile bounding box (after tiling with buffer)", False))
     self.addParametersRasterOutputGUI()
示例#35
0
 def defineCharacteristics(self):
     self.name = 'Cloud Metrics'
     self.group = 'Points'
     self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
     self.addOutput(OutputFile(self.OUTPUT, 'Output file with tabular metric information', 'dtm'))
     above = ParameterString(self.ABOVE, 'Above', '', False)
     above.isAdvanced = True
     self.addParameter(above)
     firstImpulse = ParameterBoolean(self.FIRSTIMPULSE, 'First Impulse', False)
     firstImpulse.isAdvanced = True
     self.addParameter(firstImpulse)
     firstReturn = ParameterBoolean(self.FIRSTRETURN, 'First Return', False)
     firstReturn.isAdvanced = True
     self.addParameter(firstReturn)
     htmin = ParameterString(self.HTMIN, 'Htmin', '', False, True)
     htmin.isAdvanced = True
     self.addParameter(htmin)
示例#36
0
    def defineCharacteristics(self):
        self.name = 'Grid Metrics'
        self.group = 'Points'
        self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
        self.addParameter(ParameterFile(self.GROUND, 'Input ground DTM layer'))
        self.addParameter(ParameterNumber(self.HEIGHT, 'Height break'))
        self.addParameter(ParameterNumber(self.CELLSIZE, 'Cellsize'))

        self.addOutput(OutputFile(self.OUTPUT_CSV_ELEVATION, 'Output table with grid metrics'))

        output_csv_intensity = OutputFile(self.OUTPUT_CSV_INTENSITY, 'OUTPUT CSV INTENSITY')
        output_csv_intensity.hidden = True
        self.addOutput(output_csv_intensity)

        output_txt_elevation = OutputFile(self.OUTPUT_TXT_ELEVATION, 'OUTPUT CSV INTENSITY')
        output_txt_elevation.hidden = True
        self.addOutput(output_txt_elevation)

        output_txt_intensity = OutputFile(self.OUTPUT_TXT_INTENSITY, 'OUTPUT CSV INTENSITY')
        output_txt_intensity.hidden = True
        self.addOutput(output_txt_intensity)

        outlier = ParameterString(self.OUTLIER, 'Outlier:low,high', '', False, True)
        outlier.isAdvanced = True
        self.addParameter(outlier)
        first = ParameterBoolean(self.FIRST, 'First', False)
        first.isAdvanced = True
        self.addParameter(first)
        minht = ParameterString(self.MINHT, 'Htmin', '', False, True)
        minht.isAdvanced = True
        self.addParameter(minht)
        class_var = ParameterString(self.CLASS, 'Class (set blank if not used)', '', False, True)
        class_var.isAdvanced = True
        self.addParameter(class_var)
示例#37
0
文件: Catalog.py 项目: agresta/QGIS
 def defineCharacteristics(self):
     self.name = 'Catalog'
     self.group = 'Points'
     self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))       
     self.addOutput(OutputFile(self.OUTPUT, 'Output files'))
     density = ParameterString(self.DENSITY, 'Density - area, min, max (set blank if not used)', '', False, True)
     density.isAdvanced = True
     self.addParameter(density)
     firest_density = ParameterString(self.FIRSTDENSITY, 'First Density - area, min, max (set blank if not used)', '', False, True)
     firest_density.isAdvanced = True
     self.addParameter(firest_density)
     intensity = ParameterString(self.INTENSITY, 'Intensity - area, min, max (set blank if not used)', '', False, True)
     intensity.isAdvanced = True
     self.addParameter(intensity)
     advance_modifiers = ParameterString(self.ADVANCED_MODIFIERS, 'Additional modifiers', '', False, True)
     advance_modifiers.isAdvanced = True
     self.addParameter(advance_modifiers)
示例#38
0
 def defineCharacteristics(self):
     self.name = 'Grid Surface Create'
     self.group = 'Surface'
     self.addParameter(ParameterFile(self.INPUT, 'Input las layer'))
     self.addParameter(ParameterNumber(self.CELLSIZE, 'Cellsize', 0, None, 10.0))
     self.addParameter(ParameterSelection(self.XYUNITS, 'XY Units', self.UNITS))
     self.addParameter(ParameterSelection(self.ZUNITS, 'Z Units', self.UNITS))   
     self.addOutput(OutputFile(self.OUTPUT_DTM, 'DTM Output Surface', 'dtm'))
     spike = ParameterString(self.SPIKE, 'Spike (set blank if not used)', '', False, True)
     spike.isAdvanced = True
     self.addParameter(spike)
     median = ParameterString(self.MEDIAN, 'Median', '', False, True)
     median.isAdvanced = True
     self.addParameter(median)
     smooth = ParameterString(self.SMOOTH, 'Smooth', '', False, True)
     smooth.isAdvanced = True
     self.addParameter(smooth)     
     slope = ParameterString(self.SLOPE, 'Slope', '', False, True)
     slope.isAdvanced = True
     self.addParameter(slope)  
     minimum = ParameterBoolean(self.MINIMUM, 'Minimum (set blank if not used)', False)
     minimum.isAdvanced = True
     self.addParameter(minimum)   
     class_var = ParameterString(self.CLASS, 'Class(es)', 2, False, True)
     class_var.isAdvanced = True
     self.addParameter(class_var)
     advance_modifiers = ParameterString(self.ADVANCED_MODIFIERS, 'Additional modifiers', '', False, True)
     advance_modifiers.isAdvanced = True
     self.addParameter(advance_modifiers)    
示例#39
0
 def addAdvancedModifiers(self):
     param = ParameterString(self.ADVANCED_MODIFIERS, 'Additional modifiers'
                             , '')
     param.isAdvanced = True
     self.addParameter(param)