Class: QgsFeatureStore

A container for features with the same fields and crs.

Class Hierarchy

Inheritance diagram of qgis.core.QgsFeatureStore

Base classes

QgsFeatureSink

An interface for objects which accept features via addFeature(s) methods.

class qgis.core.QgsFeatureStore[source]

Bases: QgsFeatureSink

__init__()
__init__(fields: QgsFields, crs: QgsCoordinateReferenceSystem)

Constructor

Parameters:
__init__(a0: QgsFeatureStore)
Parameters:

a0 (QgsFeatureStore)

count(self) int[source]

Returns the number of features contained in the store.

Return type:

int

crs(self) QgsCoordinateReferenceSystem[source]

Returns the store’s coordinate reference system.

See also

setCrs()

Return type:

QgsCoordinateReferenceSystem

features(self) List[QgsFeature][source]

Returns the list of features contained in the store.

Return type:

List[QgsFeature]

fields(self) QgsFields[source]

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)[source]

Sets the store’s crs.

See also

crs()

Parameters:

crs (QgsCoordinateReferenceSystem)

setFields(self, fields: QgsFields)[source]

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 | None, Any])[source]

Sets a map of optional parameters for the store.

See also

params()

Parameters:

parameters (Dict[Optional[str], Any])