<div dir="ltr"><div>Nyall,</div><div><br></div><div>Thank you so much for your help. That was exactly what I needed and I don't think I would have figured that one out.</div><div><br></div><div>Calvin<br></div><div><div class="gmail_extra"><br><div class="gmail_quote"><span class=""></span><br><span class=""></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>Actually the best approach is to use a layer post processor. This is<br>
flexible and totally thread-safe :)<br>
<br>
I don't think there's any Python examples in QGIS yet, but see<br>
<br>
<a href="https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmcategorizeusingstyle.cpp#L104" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/<wbr>blob/master/src/analysis/<wbr>processing/<wbr>qgsalgorithmcategorizeusingsty<wbr>le.cpp#L104</a><br>
<br>
and<br>
<br>
<a href="https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmimportphotos.cpp#L227" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/<wbr>blob/master/src/analysis/<wbr>processing/<wbr>qgsalgorithmimportphotos.cpp#<wbr>L227</a><br>
<br>
for some c++ examples.<br>
<br>
Here's a possible Python example:<br>
<br>
<a href="https://gist.github.com/nyalldawson/26c091dd48b4f8bf56f172efe22cf75f" rel="noreferrer" target="_blank">https://gist.github.com/<wbr>nyalldawson/<wbr>26c091dd48b4f8bf56f172efe22cf7<wbr>5f</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Nyall<br>
</font></span></blockquote></div><br></div></div></div>