Class: QgsVectorLayerFeatureSource¶
- class qgis.core.QgsVectorLayerFeatureSource¶
Bases:
QgsAbstractFeatureSource
Partial snapshot of vector layer’s state (only the members necessary for access to features)
QgsVectorLayerFeatureSource(layer:
QgsVectorLayer
) Constructor for QgsVectorLayerFeatureSource.- Parameters
layer –
source layer
Methods
Returns the coordinate reference system for features retrieved from this source.
Returns the fields that will be available for features that are retrieved from this source.
- param request
Returns the layer id of the source layer.
- crs(self) QgsCoordinateReferenceSystem ¶
Returns the coordinate reference system for features retrieved from this source.
New in version 3.0.
- Return type
- fields(self) QgsFields ¶
Returns the fields that will be available for features that are retrieved from this source.
New in version 3.0.
- Return type
- getFeatures(self, request: QgsFeatureRequest = QgsFeatureRequest()) QgsFeatureIterator ¶
- Parameters
request (
QgsFeatureRequest
= QgsFeatureRequest()) –- Return type
- id(self) str ¶
Returns the layer id of the source layer.
New in version 3.4.
- Return type
str
- iteratorClosed(self, it: QgsAbstractFeatureIterator)¶
- iteratorOpened(self, it: QgsAbstractFeatureIterator)¶