Class: ProcessingAlgFactory¶
Methods
Define the help for the algorithm using @alg.help. |
|
Define a input parameter for this algorithm using @alg.input. |
|
Define a output parameter for this algorithm using @alg.output. |
|
Returns a translatable string with the self.tr() function. |
Attributes
- class qgis.processing.ProcessingAlgFactory¶
Bases:
object
- ANNOTATION_LAYER = 'ANNOTATION_LAYER'¶
- AUTH_CFG = 'AUTH_CFG'¶
- BAND = ('BAND',)¶
- BOOL = ('BOOL',)¶
- COLOR = 'COLOR'¶
- COORDINATE_OPERATION = 'COORDINATE_OPERATION'¶
- CRS = ('CRS',)¶
- DATABASE_SCHEMA = 'DATABASE_SCHEMA'¶
- DATABASE_TABLE = 'DATABASE_TABLE'¶
- DATE = 'DATE'¶
- DATETIME = 'DATETIME'¶
- DISTANCE = ('DISTANCE',)¶
- ENUM = ('ENUM',)¶
- EXPRESSION = ('EXPRESSION',)¶
- EXTENT = ('EXTENT',)¶
- FIELD = ('FIELD',)¶
- FILE = ('FILE',)¶
- FILE_DEST = ('FILE_DEST',)¶
- FOLDER = ('FOLDER',)¶
- FOLDER_DEST = ('FOLDER_DEST',)¶
- GEOMETRY = ('GEOMETRY',)¶
- HTML = ('HTML',)¶
- INT = ('INT',)¶
- LAYERDEF = ('LAYERDEF',)¶
- LAYOUT = 'LAYOUT'¶
- LAYOUT_ITEM = 'LAYOUT_ITEM'¶
- MAPLAYER = ('MAPLAYER',)¶
- MAP_THEME = 'MAP_THEME'¶
- MATRIX = ('MATRIX',)¶
- MESH_LAYER = ('MESH_LAYER',)¶
- MULTILAYER = ('MULTILAYER',)¶
- NUMBER = ('NUMBER',)¶
- POINT = ('POINT',)¶
- POINTCLOUD_LAYER = 'POINTCLOUD_LAYER'¶
- POINTCLOUD_LAYER_DEST = ('POINTCLOUD_LAYER_DEST',)¶
- POINT_CLOUD_LAYER = ('POINT_CLOUD_LAYER',)¶
- PROVIDER_CONNECTION = 'PROVIDER_CONNECTION'¶
- RANGE = ('RANGE',)¶
- RASTER_LAYER = ('RASTER_LAYER',)¶
- RASTER_LAYER_DEST = ('RASTER_LAYER_DEST',)¶
- SCALE = 'SCALE'¶
- SINK = 'SINK'¶
- SOURCE = 'SOURCE'¶
- STRING = ('STRING',)¶
- TIME = 'TIME'¶
- 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 QCoreApplication.translate() 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.POINTCLOUD_LAYER_DEST: QgsProcessingParameterPointCloudDestination
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.GEOMETRY: QgsProcessingParameterGeometry
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
alg.DATETIME: QgsProcessingParameterDateTime(type=QgsProcessingParameterDateTime.Type.DateTime)
alg.DATE: QgsProcessingParameterDateTime(type=QgsProcessingParameterDateTime.Type.Date)
alg.TIME: QgsProcessingParameterDateTime(type=QgsProcessingParameterDateTime.Type.Time)
alg.MAP_THEME: QgsProcessingParameterMapTheme
alg.PROVIDER_CONNECTION: QgsProcessingParameterProviderConnection
alg.DATABASE_SCHEMA: QgsProcessingParameterDatabaseSchema
alg.DATABASE_TABLE: QgsProcessingParameterDatabaseTable
alg.COORDINATE_OPERATION: QgsProcessingParameterCoordinateOperation
alg.POINTCLOUD_LAYER: QgsProcessingParameterPointCloudLayer
alg.ANNOTATION_LAYER: QgsProcessingParameterAnnotationLayer
- 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.POINTCLOUD_LAYER: QgsProcessingOutputPointCloudLayer
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.