[QGIS-Developer] Example script for Processing in QGIS 3

Anita Graser anitagraser at gmx.at
Fri Jan 26 11:33:40 PST 2018


On Tue, Jan 23, 2018 at 12:14 PM, G. Allegri <giohappy at gmail.com> wrote:

> Hi Nyall,
> scripts seem way more complex then before. I guess it is the simplest way
> that could be found to accomodate Processing scripts to the refactored code.
> Some questions from the previous scripts examples:
>
> 1) Is automatic output / sink parameter conversion impossible to obtain?
> In [1] self.parameterAsSink is used, and it's not very clear to me what the
> second method output (Biggest_parts) represent. Input / source (Polygons)
> is used directly instead, as it was in QGIS 2.x
>
> 2) There are some global vars that appear to be automagically injected by
> the script execution context, like "parameters" and "context". Are they
> documented somewhere?
>
> 3) The test scripts use different approaches. Centroids.py use source /
> sink, while the others two define vector / vectorDestination. Are they
> supposed to work?
>

​I'd like to second Giovanni's questions. ​The current situation is a bit
confusing and looks considerably more complex than the previous
implementation.

Regards,
Anita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180126/2bdbc258/attachment.html>


More information about the QGIS-Developer mailing list