<div><div dir="auto">Dear all,</div><div dir="auto">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.</div><div dir="auto">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:</div><div dir="auto"><pre style="word-wrap:break-word;white-space:pre-wrap">pointlayer.selectByRect(rect, QgsVectorLayer.SetSelection)

processing.run("qgis:voronoipolygons", {
         'INPUT': QgsProcessingFeatureSourceDefinition(
                    <a href="http://pointlayer.id" target="_blank">pointlayer.id</a>(),
                    True),
         'BUFFER': 10,
         'OUTPUT': outpath})</pre><pre style="word-wrap:break-word;white-space:pre-wrap"><span style="font-family:-apple-system,HelveticaNeue;white-space:normal">error, can’t find the layer with that id, since it expects to find it in the proje</span><br></pre><pre style="word-wrap:break-word;white-space:pre-wrap"><span style="font-family:-apple-system,HelveticaNeue;white-space:normal">Any ideas? Is it possible to build a </span><span style="font-family:-apple-system,HelveticaNeue">QgsProcessingParameterDefinition for the task?</span></pre><pre style="word-wrap:break-word;white-space:pre-wrap"><div dir="auto" style="font-family:-apple-system,HelveticaNeue;white-space:normal">Cheers,</div><div dir="auto" style="font-family:-apple-system,HelveticaNeue;white-space:normal">Giovanni</div></pre><pre style="word-wrap:break-word;white-space:pre-wrap"><span style="font-family:-apple-system,HelveticaNeue;white-space:normal"><br></span></pre><pre style="word-wrap:break-word;white-space:pre-wrap"><br></pre></div><div dir="auto"><br></div>
</div>