Dear all,
I was confident that it would have been simple, while I can’t find the
proper way od doing that. Having a reference to a QgsVectorLayer, I would
need to use a subset of its features to run an algorithm down the line.
I hoped there was a way to define an input as afeature source with a filter
(QgsFeatureRequest or similar. I’ve tried using
QgsProcessingFeatureSourceDefinition with a selection but with no luck:

pointlayer.selectByRect(rect, QgsVectorLayer.SetSelection)

processing.run("qgis:voronoipolygons", {
         'INPUT': QgsProcessingFeatureSourceDefinition(
                    pointlayer.id(),
                    True),
         'BUFFER': 10,
         'OUTPUT': outpath})

error, can’t find the layer with that id, since it expects to find it
in the proje

Any ideas? Is it possible to build a QgsProcessingParameterDefinition
for the task?

Cheers,
Giovanni
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to