I wrote a QGIS plugin including the "gdalogr:cliprastermymasklayer" algorithm but get the following error message:
That's the code where I used the algorithm:
def clipRasters(self):
inputDir = self.getInputPath()
outputDir = self.getOutputPath()
for lyr in glob.glob(os.path.join(inputDir, "*xyz")):
processing.run("gdalogr:cliprastermymasklayer", lyr, self.getVectorLayer(), 'none', True, False, 0,
outputDir + lyr)
Though, the error message is not specifically refering to my usage of the algorithm, I guess that's where the problem is.
Now, when I look at the following QGIS Dokumentation https://docs.qgis.org/3.4/en/docs/user_manual/processing_algs/gdal/rasterextraction.html#clip-raster-by-mask-layer, it seems that I could even give 9 arguments. Thus, why does it say in the error message that I can use only 6? Or does the message not refer to the number of arguments for the gdal algorithm?