<div dir="ltr">Great Salvatore, you're right.<div>I thought the geometry wasn't passed by the iterator but it could be used during the request expression evaulation. That was wrong ;)</div><div><br></div><div>giovanni</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-16 20:44 GMT+02:00 Salvatore Larosa <span dir="ltr"><<a href="mailto:lrssvtml@gmail.com" target="_blank">lrssvtml@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Giovanni,<br>
<span class=""><br>
On Thu, Oct 16, 2014 at 7:45 PM, G. Allegri <<a href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>> wrote:<br>
> I need to iterate over a layer without the need of geometries.<br>
> I rembember I used this flag time ago and it worked fine. Now, if I set this<br>
> on the feature request, I get an empty set of features from the iterator. Am<br>
> I doing something wrong?<br>
><br>
> req = QgsFeatureRequest(QgsExpression('$area>1000,00'))<br>
> reg.setFlags(QgsFeatureRequest.NoGeometry)<br>
> feats = [f for f in mylayer.getFeatures(req)]<br>
<br>
</span>if you set flag to NoGeometry you cannot pass the $area function as it<br>
needs of the geometry in order to calculate the correct value.<br>
your snippet should to work whether you store the value of $area in a<br>
new field and use it in your espression<br>
<br>
Could this be a reason? :)<br>
<br>
Ciao.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div><div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div>