I am writing a Processing
python script based on the template provided here.
I am creating lines (destined to the 'OUTPUT') and I would like to clip them according to a polygon entered as the 'INPUT' parameter).
I can't figure out how to call the Algorithm. For what it's worth, this doesn't work:
QgsProcessingAlgorithm('qgis:clip').run({'INPUT': self.OUTPUT, 'OVERLAY': self.INPUT})
I have tried several ways but couldn't get far as I get the error:
qgis._core.QgsProcessingAlgorithm represents a C++ abstract class and cannot be instantiated
QgsProcessingAlgorithm(..)
orvariable = QgsProcessingAlgorithm()
. Other classes inherit from it just likeclass NewProcessingAlg(QgsProcessingAlgorithm)
– Kadir Şahbaz Apr 10 '18 at 10:28processing.run()
See gis.stackexchange.com/a/262059/2856 and to get the input parameter syntax easily, run the alg manually and have a look at the processing history. – user2856 Apr 10 '18 at 10:55