<div dir="ltr"><div>A QgsProcessingOutputVectorLayer will understand you are returning a QgsVectorLayer.</div><div><br></div><div>Maybe I'm wrong, but it works well : <br></div><div><a href="https://github.com/3liz/QuickOSM/blob/master/QuickOSM/quick_osm_processing/advanced/open_osm_file.py#L130..L158">https://github.com/3liz/QuickOSM/blob/master/QuickOSM/quick_osm_processing/advanced/open_osm_file.py#L130..L158</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 25 août 2021 à 11:59, Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net">rdmailings@duif.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 8/25/21 8:43 AM, Etienne Trimaille wrote:<br>
> You can output a QgsVectorLayer : <a href="https://qgis.org/api/classQgsProcessingOutputVectorLayer.html" rel="noreferrer" target="_blank">https://qgis.org/api/classQgsProcessingOutputVectorLayer.html</a> <<a href="https://qgis.org/api/classQgsProcessingOutputVectorLayer.html" rel="noreferrer" target="_blank">https://qgis.org/api/classQgsProcessingOutputVectorLayer.html</a>><br>
> The sink is not required and you would avoid a loop to insert all features.<br>
> <br>
> I think you should also return sink ID or layer ID, not the object itself.<br>
<br>
Hi Etienne,<br>
<br>
But the code of Andrew would receive features from a ArcGis feature server. <br>
How would you instruct QgsProcessingOutputVectorLayer to use that provider?<br>
QgsProcessing::SourceType shows (to me) only general types?<br>
<br>
Or is there some way to use it as a wrapper around a real layer?<br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
</blockquote></div>