Geographic Information Systems Asked on August 10, 2021
In QGIS 3.6+, there are two different ways to construct a Processing Algorithm.
Defining a class inherited from QgsProcessingAlgorithm
. In this case, I can define flags for an algorithm as follows:
class ExampleProcessingAlgorithm(QgsProcessingAlgorithm):
....
def flags(self):
return super().flags() | QgsProcessingAlgorithm.FlagNoThreading
....
Using @alg
decorator.
@alg(name='algorithm_name', ...
@alg.input(type=alg.SOURCE, ...
@alg.output(type=alg.NUMBER, ...
def algorithm_name(instance, parameters, context, feedback, inputs):
"""
Description of the algorithm.
"""
...
In @alg
case, how can I set flags? There is no explanation about this in QGIS Documentation.
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP