Class: QgsFeatureStore¶
- class qgis.core.QgsFeatureStore¶
Bases:
QgsFeatureSink
A container for features with the same fields and crs.
QgsFeatureStore() Constructor
QgsFeatureStore(fields:
QgsFields
, crs:QgsCoordinateReferenceSystem
) ConstructorQgsFeatureStore(
QgsFeatureStore
)Methods
- param feature:
- param features:
Returns the number of features contained in the store.
Returns the store's coordinate reference system.
Returns the list of features contained in the store.
Returns the store's field list.
Returns the map of optional parameters.
Sets the store's
crs
.Sets the store's
fields
.Sets a map of optional
parameters
for the store.- addFeature(self, feature: QgsFeature, flags: QgsFeatureSink.Flags | QgsFeatureSink.Flag = QgsFeatureSink.Flags()) bool ¶
- Parameters:
feature (QgsFeature) –
flags (Union[QgsFeatureSink.Flags) –
- Return type:
bool
- addFeatures(self, features: Iterable[QgsFeature], flags: QgsFeatureSink.Flags | QgsFeatureSink.Flag = QgsFeatureSink.Flags()) bool ¶
- Parameters:
features (Iterable[QgsFeature]) –
flags (Union[QgsFeatureSink.Flags) –
- Return type:
bool
- count(self) int ¶
Returns the number of features contained in the store.
- Return type:
int
- crs(self) QgsCoordinateReferenceSystem ¶
Returns the store’s coordinate reference system.
See also
- Return type:
- features(self) List[QgsFeature] ¶
Returns the list of features contained in the store.
- Return type:
List[QgsFeature]
- params(self) Dict[str, Any] ¶
Returns the map of optional parameters.
See also
- Return type:
Dict[str, Any]
- setCrs(self, crs: QgsCoordinateReferenceSystem)¶
Sets the store’s
crs
.See also
- Parameters:
crs (QgsCoordinateReferenceSystem) –