[QGIS-Developer] using a features subset as an input for a processing alg

G. Allegri giohappy at gmail.com
Fri Sep 13 01:33:22 PDT 2019


>
> It depends if you can get away with a layer subset string for the
> filter. (I.e. provider side filter). Because if so, you can embed
> these filters in layer sources, e.g.
>
>    processing.run("native:centroids",
> {'INPUT':'/home/me/layer.shp|layerid=0|subset=\"something\" =
> \'value\'','ALL_PARTS':False,'OUTPUT':'TEMPORARY_OUTPUT'})
>

Unfortunately no, since my filter is a spatial filter (a rectangle in this
case, but it's not relevant).
I fear I will have to create my own voronoi algorithm.


> Would be nice to extend QgsProcessingFeatureSourceDefinition to
> support an expression based filter, that sounds like a good
> addition...
>

Definitely :)

Giovanni


>
> Nyall
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190913/b3f49048/attachment.html>


More information about the QGIS-Developer mailing list