I have a vector layer (grid). Currently I select some tiles with the select tool and paste some Python code to get information about these features.
layer = qgis.utils.iface.activeLayer()
selected_features = layer.selectedFeatures()
for i in selected_features:
...
Now, I want to get the feature values from the tiles which I can see on the map canvas, without selecting them.
There were two possibilities.
- Selecting only the features which are fully visible ("contained" in the map canvas)
- Selecting all features which are also partly visible ("intersecting" the map canvas)
Is there a way to do this with PyQGIS?
