<div dir="ltr"><div>I am working on a processing routine that can take a source that potentially has points, lines and polygons. I define 3 feature sinks for the 3 geometries and they are optional. This example is for the points.<br></div><div><br></div><div>        self.addParameter(<br>            QgsProcessingParameterFeatureSink(<br>                self.PrmPointOutputLayer,<br>                tr('Output point layer'),<br>                optional=True)<br>            )<br></div><div><br></div><div>1) How doe I know in the processAlgorithm whether the user has this set a feature sink to "Skip Output"?</div><div><br></div><div>2) I really don't know whether I have points, lines, and/or polygons until I process the file and from the 3 feature sinks I just add the data to the appropriate feature sink as I receive it . How do a get a count of the number of features once I have processed the file from sinkPt or dest_id_pt?<br></div><div><br></div><div>        (sinkPt, dest_id_pt) = self.parameterAsSink(parameters,<br>            self.PrmPointOutputLayer, context, fields,<br>            QgsWkbTypes.Point, epsg4326)</div><div><br></div><div>"sinkPt" seems to only have the ability to add features and not count them.</div><div><br></div><div>3) I see to reason to return a layer to QGIS if it has no data which is the reason to check the feature count. In the 
processAlgorithm 

return statement do I only return those layers that have data?</div><div><br></div><div>        return {<br>            self.PrmPointOutputLayer: dest_id_pt,<br>            self.PrmLineOutputLayer: dest_id_line,<br>            self.PrmPolygonOutputLayer: dest_id_poly<br>            }</div><div><br></div><div>Thanks,</div><div><br></div><div>Calvin<br></div><div><br></div><br></div>