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

Anita Graser anitagraser at gmx.at
Sat Jan 27 02:20:08 PST 2018


Thank you Nyall!

On Sat, Jan 27, 2018 at 12:39 AM, Nyall Dawson <nyall.dawson at gmail.com>
wrote:
>
> But -- while we're at it -- am I the only one who finds processing
> script files in general to be full of a lot of black magic? (Note that
> I'm referring to script files here, not proper algorithms). When
> refactoring processing to c++ I kept the script syntax unchanged from
> 2.x as much as possible (with the exception of the sinks, which I
> cannot work out how to improve - save for re-creating a dummy
> VectorWriter object that wraps a bunch of stuff up). But to me it's
> *always* been rather un-python-like how parameters and outputs are
> defined in comments, how some variables are automatically created, how
> some output variables are expected, etc.


Very good point! Does anyone know the rationale behind the script syntax?
Is there any big advantage over the nicely pythonic way of implementing
regular Processing algorithms like
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/SpatialIndex.py
?

Should we get rid of scripts with their special syntax and just have a way
to write
QgisAlgorithm
​s?​

Regards,
Anita

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180127/320292dc/attachment-0001.html>


More information about the QGIS-Developer mailing list