[Qgis-developer] QgsFeatureRequest.NoGeometry flag makes iterator return no features
G. Allegri
giohappy at gmail.com
Thu Oct 16 10:45:32 PDT 2014
I need to iterate over a layer without the need of geometries.
I rembember I used this flag time ago and it worked fine. Now, if I set
this on the feature request, I get an empty set of features from the
iterator. Am I doing something wrong?
req = QgsFeatureRequest(QgsExpression('$area>1000,00'))
reg.setFlags(QgsFeatureRequest.NoGeometry)
feats = [f for f in mylayer.getFeatures(req)]
if a set the flags to QgsFeatureRequest.Noflags the iterator returns the
correct features.
giovanni
--
Giovanni Allegri
http://about.me/giovanniallegri
Twitter: https://twitter.com/_giohappy_
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20141016/df0ad246/attachment.html>
More information about the Qgis-developer
mailing list