<div dir="ltr">Hi <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Michaël,</span><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 15, 2018 at 6:36 PM, kimaidou <span dir="ltr"><<a href="mailto:kimaidou@gmail.com" target="_blank">kimaidou@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi all,<br><br></div>I have a simple processing python alg which <br>* generates a buffer with qgis:buffer<br>* use qgis:fieldcalculator to add an buf_area field -> the output vector of my alg is this buffer+new field.<br><br>I would like to parse the features of the output vector in order to gather some information and put it in a new string output. I have not been able to get the layer object to perform a getFeatures on it.<br><br></div>See the code<br><a href="http://paste.debian.net/1010463/" target="_blank">http://paste.debian.net/<wbr>1010463/</a><br><br></div>In line 32, my blayer is None<br></div>I think I am not using the good way to get the output vector layer features? I tried to use the same way as for reading an input layer, but oviously it is different.</div></div></div></blockquote><div><br></div><div>What does happen if you put area_result['OUTPUT'] directly instead of self.parameterAsSource? </div><div>parameterAsSource() accept a parameter as first argument and area_result should be already un QgsVectorLayer.</div><div><br></div><div>Where you are trying to execute it from?</div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Salvatore Larosa<br>linkedIn: <a href="http://linkedin.com/in/larosasalvatore" target="_blank">http://linkedin.com/in/larosasalvatore</a><br>twitter: @lrssvt<br>skype: s.larosa<br>IRC: lrssvt on freenode<br></div>
</div></div>