<div dir="ltr"><div>
<span class="gmail-">> 3) I see no 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?<br>
><br>
>         return {<br>
>             self.PrmPointOutputLayer: dest_id_pt,<br>
>             self.PrmLineOutputLayer: dest_id_line,<br>
>             self.PrmPolygonOutputLayer: dest_id_poly<br>
>             }<br>
<br>
</span>> You can omit these from the returned dictionary in this case - so if<br>



you're recording the counts of features added to each sink, only add<br>



entries to the results dictionary where the count is > 0.

<br></div><div><br></div><div>This almost did what was needed. It looks like calling</div><div><br></div><div>
<span class="gmail-im">         (sinkPt, dest_id_pt) = self.parameterAsSink(<wbr>parameters,<br>
             self.PrmPointOutputLayer, context, fields,<br>
             QgsWkbTypes.Point, epsg4326)</span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">is what determines what layers are added to QGIS and not the dictionary I return. I guess I'm going to need to call 
<span class="gmail-im">parameterAsSink</span>

the first time I have data to be added. This is going to make the code more messy, but I don't know another way to prevent empty layers from being added.</span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">Calvin</span><br></div><div class="gmail_extra"><br></div></div>