Class: QgsCachedFeatureIterator

class qgis.core.QgsCachedFeatureIterator(vlCache: QgsVectorLayerCache, featureRequest: QgsFeatureRequest)

Bases: QgsAbstractFeatureIterator

This constructor creates a feature iterator, that delivers all cached features. No request is made to the backend.

Parameters

QgsCachedFeatureIterator(QgsCachedFeatureIterator)

Delivers features from the cache

Methods

close

Close this iterator.

deref

fetchFeature

Implementation for fetching a feature.

filterRectToSourceCrs

geometryToDestinationCrs

nextFeatureFilterExpression

nextFeatureFilterFids

We have a local special iterator for FilterFids, no need to run the generic.

prepareSimplification

ref

rewind

Rewind to the beginning of the iterator

close(self) → bool

Close this iterator. No further features will be available.

Return type

bool

Returns

True if successful

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

Implementation for fetching a feature.

Parameters

f (QgsFeature) – Will write to this feature

Return type

bool

Returns

bool True if the operation was OK

See also

bool()

filterRectToSourceCrs()
geometryToDestinationCrs()
nextFeatureFilterExpression()
nextFeatureFilterFids(self, f: QgsFeature) → bool

We have a local special iterator for FilterFids, no need to run the generic.

Parameters

f (QgsFeature) – Will write to this feature

Return type

bool

Returns

bool True if the operation was OK

prepareSimplification()
ref()
rewind(self) → bool

Rewind to the beginning of the iterator

Return type

bool

Returns

bool True if the operation was OK