Class: QgsFeatureStore

class qgis.core.QgsFeatureStore

Bases: QgsFeatureSink

Constructor

QgsFeatureStore(fields: QgsFields, crs: QgsCoordinateReferenceSystem) Constructor

QgsFeatureStore(QgsFeatureStore)

A container for features with the same fields and crs.

Methods

addFeature

param feature

addFeatures

param features

count

Returns the number of features contained in the store.

crs

Returns the store’s coordinate reference system.

features

Returns the list of features contained in the store.

fields

Returns the store’s field list.

params

Returns the map of optional parameters.

setCrs

Sets the store’s crs.

setFields

Sets the store’s fields.

setParams

Sets a map of optional parameters for the store.

addFeature(self, feature: QgsFeature, flags: Union[QgsFeatureSink.Flags, QgsFeatureSink.Flag] = 0) → bool
Parameters
Return type

bool

addFeatures(self, features: Iterable[QgsFeature], flags: Union[QgsFeatureSink.Flags, QgsFeatureSink.Flag] = 0) → bool
Parameters
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

setCrs()

Return type

QgsCoordinateReferenceSystem

features(self) → List[QgsFeature]

Returns the list of features contained in the store.

Return type

List[QgsFeature]

fields(self) → QgsFields

Returns the store’s field list.

See also

setFields()

Return type

QgsFields

params(self) → Dict[str, Any]

Returns the map of optional parameters.

See also

setParams()

Return type

Dict[str, Any]

setCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the store’s crs.

See also

crs()

Parameters

crs (QgsCoordinateReferenceSystem) –

setFields(self, fields: QgsFields)

Sets the store’s fields. Every contained feature’s fields will be reset to match fields.

See also

fields()

Parameters

fields (QgsFields) –

setParams(self, parameters: Dict[str, Any])

Sets a map of optional parameters for the store.

See also

params()

Parameters

parameters (Dict[str) –