[Qgis-community-team] Programmatically iterate over features with Processing in QGIS 3

DelazJ delazj at gmail.com
Tue Sep 11 09:12:09 PDT 2018


Hi all,

QGIS documentation states [0] that Processing can be used to iterate over
features with the following code:

import processingfeatures = processing.features(layer)for feature in features:
    # do whatever you need with the feature

This code no longer works in QGIS3 and needs an update [1] I fail to find.
So anyone to suggest the right replacement, please?


[0] https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#iterating-over-selected-features
[1] https://github.com/qgis/QGIS-Documentation/pull/2871

Thanks,

Harrissou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-community-team/attachments/20180911/8d440502/attachment.html>


More information about the Qgis-community-team mailing list