Class: QgsVectorLayerFeatureIterator

class qgis.core.QgsVectorLayerFeatureIterator(source: QgsVectorLayerFeatureSource, ownSource: bool, request: QgsFeatureRequest)

Bases: QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSourceBase

Parameters
class FetchJoinInfo

Bases: sip.wrapper

QgsVectorLayerFeatureIterator.FetchJoinInfo(QgsVectorLayerFeatureIterator.FetchJoinInfo)

addJoinedAttributesCached(self, f: QgsFeature, joinValue: Any)
Parameters
addJoinedAttributesDirect(self, f: QgsFeature, joinValue: Any)
Parameters
attributes
indexOffset
joinField
joinInfo
joinLayer
targetField
close(self) → bool

end of iterating: free the resources / lock

Return type

bool

deref()
fetchFeature(self, feature: QgsFeature) → bool

fetch next feature, return true on success

Parameters

feature (QgsFeature) –

Return type

bool

filterRectToSourceCrs()
geometryToDestinationCrs()
isValid(self) → bool
Return type

bool

iteratorClosed()
nextFeatureFilterExpression(self, f: QgsFeature) → bool

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

nextFeatureFilterFids()
prepareSimplification(self, simplifyMethod: QgsSimplifyMethod) → bool

Setup the simplification of geometries to fetch using the specified simplify method

Parameters

simplifyMethod (QgsSimplifyMethod) –

Return type

bool

ref()
rewind(self) → bool

reset the iterator to the starting position

Return type

bool