1

When calling a QgsAlgorithm from within another, the result will be named after this algorithm output regardless of what is setup as the output of the main one.

For instance, taking the code from the answer to this question, although the output is set with the name 'OUTPUT' and the returned dictionary is the following:

{'OUTPUT': 'clipped_xxxxxxxxxxxxxxxxxxxxx'}

the output layer is actually named 'clipped' and I cannot seem to be able to change this.

I've tried the setName() method on the QgsVectorLayer retrieved with QgsProcessingUtils.mapLayerFromString() but to no avail.

0

It needs to be an actual path on your machine.

For example {'OUTPUT': '/root/data/clipped.gpkg'}

  • Ok but the algorithm returns a layer id, not a path – YeO Aug 8 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.