A QgsProcessingOutputVectorLayer will understand you are returning a
QgsVectorLayer.

Maybe I'm wrong, but it works well :
https://github.com/3liz/QuickOSM/blob/master/QuickOSM/quick_osm_processing/advanced/open_osm_file.py#L130..L158

Le mer. 25 août 2021 à 11:59, Richard Duivenvoorde <rdmaili...@duif.net> a
écrit :

> On 8/25/21 8:43 AM, Etienne Trimaille wrote:
> > You can output a QgsVectorLayer :
> https://qgis.org/api/classQgsProcessingOutputVectorLayer.html <
> https://qgis.org/api/classQgsProcessingOutputVectorLayer.html>
> > The sink is not required and you would avoid a loop to insert all
> features.
> >
> > I think you should also return sink ID or layer ID, not the object
> itself.
>
> Hi Etienne,
>
> But the code of Andrew would receive features from a ArcGis feature
> server.
> How would you instruct QgsProcessingOutputVectorLayer to use that provider?
> QgsProcessing::SourceType shows (to me) only general types?
>
> Or is there some way to use it as a wrapper around a real layer?
>
> Regards,
>
> Richard Duivenvoorde
>
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to