Class: ProcessingAlgFactory

class qgis.processing.ProcessingAlgFactory

Bases: object

Enums

Methods

help

Define the help for the algorithm using @alg.help.

input

Define a input parameter for this algorithm using @alg.input.

output

Define a output parameter for this algorithm using @alg.output.

tr

Returns a translatable string with the self.tr() function.

Signals

Attributes

AUTH_CFG

BAND

BOOL

COLOR

CRS

DISTANCE

ENUM

EXPRESSION

EXTENT

FIELD

FILE

FILE_DEST

FOLDER

FOLDER_DEST

HTML

INT

LAYERDEF

LAYOUT

LAYOUT_ITEM

MAPLAYER

MATRIX

MESH_LAYER

MULTILAYER

NUMBER

POINT

RANGE

RASTER_LAYER

RASTER_LAYER_DEST

SCALE

SINK

SOURCE

STRING

VECTOR_LAYER

VECTOR_LAYER_DEST

AUTH_CFG = 'AUTH_CFG'
BAND = ('BAND',)
BOOL = ('BOOL',)
COLOR = 'COLOR'
CRS = ('CRS',)
DISTANCE = ('DISTANCE',)
ENUM = ('ENUM',)
EXPRESSION = ('EXPRESSION',)
EXTENT = ('EXTENT',)
FIELD = ('FIELD',)
FILE = ('FILE',)
FILE_DEST = ('FILE_DEST',)
FOLDER = ('FOLDER',)
FOLDER_DEST = ('FOLDER_DEST',)
HTML = ('HTML',)
INT = ('INT',)
LAYERDEF = ('LAYERDEF',)
LAYOUT = 'LAYOUT'
LAYOUT_ITEM = 'LAYOUT_ITEM'
MAPLAYER = ('MAPLAYER',)
MATRIX = ('MATRIX',)
MESH_LAYER = ('MESH_LAYER',)
MULTILAYER = ('MULTILAYER',)
NUMBER = ('NUMBER',)
POINT = ('POINT',)
RANGE = ('RANGE',)
RASTER_LAYER = ('RASTER_LAYER',)
RASTER_LAYER_DEST = ('RASTER_LAYER_DEST',)
SCALE = 'SCALE'
SINK = 'SINK'
SOURCE = 'SOURCE'
STRING = ('STRING',)
VECTOR_LAYER = ('VECTOR_LAYER',)
VECTOR_LAYER_DEST = ('VECTOR_LAYER_DEST',)
property current
property current_defined
help(helpstring, *args, **kwargs)

Define the help for the algorithm using @alg.help. This method will be used instead of the doc string on the function as the help in the processing dialogs.

Parameters

helpstring – The help text. Use alg.tr() for translation support.

input(type, *args, **kwargs)

Define a input parameter for this algorithm using @alg.input. Apart from type this method will take all arguments and pass them though to the correct QgsProcessingParameterDefinition type.

Types:

str: QgsProcessingParameterString int: QgsProcessingParameterNumber float: QgsProcessingParameterNumber bool: QgsProcessingParameterBoolean alg.NUMBER: QgsProcessingParameterNumber alg.INT: QgsProcessingParameterNumber alg.STRING: QgsProcessingParameterString alg.DISTANCE: QgsProcessingParameterDistance alg.SINK: QgsProcessingParameterFeatureSink alg.SOURCE: QgsProcessingParameterFeatureSource alg.FILE_DEST: QgsProcessingParameterFileDestination alg.FOLDER_DEST: QgsProcessingParameterFolderDestination alg.RASTER_LAYER: QgsProcessingParameterRasterLayer alg.RASTER_LAYER_DEST: QgsProcessingParameterRasterDestination alg.VECTOR_LAYER_DEST: QgsProcessingParameterVectorDestination alg.BAND: QgsProcessingParameterBand alg.BOOL: QgsProcessingParameterBoolean alg.CRS: QgsProcessingParameterCrs alg.ENUM: QgsProcessingParameterEnum alg.EXPRESSION: QgsProcessingParameterExpression alg.EXTENT: QgsProcessingParameterExtent alg.FIELD: QgsProcessingParameterField alg.FILE: QgsProcessingParameterFile alg.MAPLAYER: QgsProcessingParameterMapLayer alg.MATRIX: QgsProcessingParameterMatrix alg.MULTILAYER: QgsProcessingParameterMultipleLayers alg.POINT: QgsProcessingParameterPoint alg.RANGE: QgsProcessingParameterRange alg.VECTOR_LAYER: QgsProcessingParameterVectorLayer alg.AUTH_CFG: QgsProcessingParameterAuthConfig alg.MESH_LAYER: QgsProcessingParameterMeshLayer alg.SCALE: QgsProcessingParameterScale alg.LAYOUT: QgsProcessingParameterLayout alg.LAYOUT_ITEM: QgsProcessingParameterLayoutItem alg.COLOR: QgsProcessingParameterColor

Parameters
  • type – The type of the input. This should be a type define on alg like alg.STRING, alg.DISTANCE

  • label – The label of the output. Translates into description arg.

  • parent – The string ID of the parent parameter. Parent parameter must be defined before its here.

  • default – The default value set for that parameter. Translates into defaultValue arg.

output(type, *args, **kwargs)

Define a output parameter for this algorithm using @alg.output. Apart from type this method will take all arguments and pass them though to the correct `QgsProcessingOutputDefinition ` type.

Types:

str: QgsProcessingOutputString int: QgsProcessingOutputNumber float: QgsProcessingOutputNumber alg.NUMBER: QgsProcessingOutputNumber alg.DISTANCE: QgsProcessingOutputNumber alg.INT: QgsProcessingOutputNumber alg.STRING: QgsProcessingOutputString alg.FILE: QgsProcessingOutputFile alg.FOLDER: QgsProcessingOutputFolder alg.HTML: QgsProcessingOutputHtml alg.LAYERDEF: QgsProcessingOutputLayerDefinition alg.MAPLAYER: QgsProcessingOutputMapLayer alg.MULTILAYER: QgsProcessingOutputMultipleLayers alg.RASTER_LAYER: QgsProcessingOutputRasterLayer alg.VECTOR_LAYER: QgsProcessingOutputVectorLayer alg.BOOL: QgsProcessingOutputBoolean

Parameters
  • type – The type of the input. This should be a type define on alg like alg.STRING, alg.DISTANCE

  • label – The label of the output. Will convert into description arg.

  • parent – The string ID of the parent parameter. Parent parameter must be defined before its here.

tr(string)

Returns a translatable string with the self.tr() function.