Re: [QGIS-Developer] Vector destination vs feature sink

2022-10-23 Thread Anita Graser via QGIS-Developer
Thank you Matthias, those future optimization possibilities sound really exciting. Based on all your responses so far, I think I'd summarize that Processing script developers should always go for the feature sink parameter QgsProcessingParameterFeatureSink. Given the info Nyall shared with

Re: [QGIS-Developer] Vector destination vs feature sink

2022-10-23 Thread Matthias Kuhn via QGIS-Developer
Hi Anita, A QgsFeatureSink is an interface for accepting features. This can be a QgsVectorLayer but does not have to be one. It can also be a spatial index, a vector file writer or others. I.e. your algorithm specifies that it produces "features" which can be sent to a vector layer, another

Re: [QGIS-Developer] Vector destination vs feature sink

2022-10-23 Thread Anita Graser via QGIS-Developer
Thank you very much, Thomas. This code comparison approach is very useful indeed. If FeatureSink covers all functions of VectorDestination and more, that still leaves me wonder what is the downside of a FeatureSink "Note: Consider using the more flexible QgsProcessingParameterFeatureSink

Re: [QGIS-Developer] Vector destination vs feature sink

2022-10-22 Thread Thomas Gratier via QGIS-Developer
Hi, Although, I do know the intend to recommend one against the other, doing some code differences helps to sort out things. They both inherits from same classes but the constructor for QgsProcessingParameterFeatureSink accepts an additionnal arg bool supportsAppend

Re: [QGIS-Developer] Vector destination vs feature sink

2022-10-21 Thread Anita Graser via QGIS-Developer
Thank you Stefan, I saw that note but was hoping some developer could shed light on what they mean by "more flexible" and "wherever possible". I guess otherwise it's just trial and error. Regards, Anita On Wednesday, 19. October 2022 07:44:05 (+02:00), Stefan Giese (WhereGroup) wrote:

[QGIS-Developer] Vector destination vs feature sink

2022-10-18 Thread Anita Graser via QGIS-Developer
Hi. Does any one of you know the real difference between QgsProcessingParameterVectorDestination versus QgsProcessingParameterFeatureSink? They seem to be used interchangably in the resources I can find. Thank you. Anita ___ QGIS-Developer mailing