Class: QgsVectorLayerFeatureIterator¶
A feature iterator which iterates over features from a
QgsVectorLayer.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
|
Helper template that cares of two things: 1. automatic deletion of source if owned by iterator, 2. notification of open/closed iterator. |
Internal feature iterator to be implemented within data providers. |
Classes
Join information prepared for fast attribute id mapping in |
Abstract Methods
end of iterating: free the resources / lock |
|
fetch next feature, return |
|
reset the iterator to the starting position |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsVectorLayerFeatureIterator. See the FAQ for more details.
Overrides default method as we only need to filter features in the edit buffer while for others filtering is left to the provider implementation. |
|
Setup the simplification of geometries to fetch using the specified simplify method |
- class qgis.core.QgsVectorLayerFeatureIterator[source]¶
Bases:
QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSourceBase- class FetchJoinInfo¶
Bases:
objectJoin information prepared for fast attribute id mapping in
QgsVectorLayerJoinBuffer.updateFeatureAttributes(). Created in theselect()method ofQgsVectorLayerJoinBufferfor the joins that contain fetched attributes- addJoinedAttributesCached(self, f: QgsFeature, joinValue: Any)¶
- Parameters:
f (QgsFeature)
joinValue (Any)
- addJoinedAttributesDirect(self, f: QgsFeature, joinValue: Any)¶
- Parameters:
f (QgsFeature)
joinValue (Any)
- attributes: QgsAttributeList¶
- indexOffset: int¶
- joinField: int¶
- joinInfo: QgsVectorLayerJoinInfo¶
- targetField: int¶
- abstract fetchFeature(self, feature: QgsFeature) bool[source]¶
fetch next feature, return
Trueon success- Parameters:
feature (QgsFeature)
- Return type:
bool
- virtual nextFeatureFilterExpression(self, f: QgsFeature) bool[source]¶
Overrides default method as we only need to filter features in the edit buffer while for others filtering is left to the provider implementation.
- Parameters:
f (QgsFeature)
- Return type:
bool
- virtual prepareSimplification(self, simplifyMethod: QgsSimplifyMethod) bool[source]¶
Setup the simplification of geometries to fetch using the specified simplify method
- Parameters:
simplifyMethod (QgsSimplifyMethod)
- Return type:
bool