QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
27 class QgsMemoryFeatureIterator;
35 QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
37 ~QgsMemoryProvider()
override;
40 static QString providerKey();
42 static QString providerDescription();
49 QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
55 QString
dataSourceUri(
bool expandAuthConfig =
true )
const override;
63 bool addAttributes(
const QList<QgsField> &attributes )
override;
69 bool setSubsetString(
const QString &theSQL,
bool updateFeatureCount =
true )
override;
73 QgsVectorDataProvider::Capabilities
capabilities()
const override;
78 QString
name()
const override;
102 QString mSubsetString;
104 friend class QgsMemoryFeatureSource;
QSet< int > QgsAttributeIds
virtual SpatialIndexPresence hasSpatialIndex() const
Returns an enum value representing the presence of a valid spatial index on the source,...
virtual bool deleteFeatures(const QgsFeatureIds &id)
Deletes one or more features from the provider.
virtual bool createSpatialIndex()
Creates a spatial index on the datasource (if supported by the provider type).
virtual bool supportsSubsetString() const
Returns true if the provider supports setting of subset strings.
Setting options for creating vector data providers.
virtual void handlePostCloneOperations(QgsVectorDataProvider *source)
Handles any post-clone operations required after this vector data provider was cloned from the source...
QgsFields fields() const override=0
Returns the fields associated with this data provider.
virtual bool setSubsetString(const QString &subset, bool updateFeatureCount=true)
Set the subset string used to create a subset of features in the layer.
virtual bool changeAttributeValues(const QgsChangedAttributesMap &attr_map)
Changes attribute values of existing features.
Container of fields for a vector layer.
Type
The WKB type describes the number of dimensions a geometry has.
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
virtual QString dataSourceUri(bool expandAuthConfig=false) const
Gets the data source specification.
A rectangle specified with double values.
virtual QString description() const =0
Returns description.
This class wraps a request for features to a vector layer (or directly its vector data provider).
virtual QgsVectorDataProvider::Capabilities capabilities() const
Returns flags containing the supported capabilities.
long featureCount() const override=0
Number of features in the layer.
virtual bool changeGeometryValues(const QgsGeometryMap &geometry_map)
Changes geometries of existing features.
virtual bool truncate()
Removes all features from the layer.
virtual QgsAbstractFeatureSource * featureSource() const =0
Returns feature source object that can be used for querying provider's data.
SpatialIndexPresence
Enumeration of spatial index presence states.
Base class that can be used for any class that is capable of returning features.
virtual bool renameAttributes(const QgsFieldNameMap &renamedAttributes)
Renames existing attributes.
QList< QgsFeature > QgsFeatureList
virtual QString storageType() const
Returns the permanent storage type for this layer as a friendly name.
A spatial index for QgsFeature objects.
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const override=0
Query the provider for features specified in request.
QSet< QgsFeatureId > QgsFeatureIds
This class represents a coordinate reference system (CRS).
virtual bool deleteAttributes(const QgsAttributeIds &attributes)
Deletes existing attributes from the provider.
bool addFeatures(QgsFeatureList &flist, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) override
Adds a list of features to the sink.
virtual QgsRectangle extent() const =0
Returns the extent of the layer.
QMap< int, QString > QgsFieldNameMap
virtual bool addAttributes(const QList< QgsField > &attributes)
Adds new attributes to the provider.
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
This is the base class for vector data providers.
virtual QString subsetString() const
Returns the subset definition string (typically sql) currently in use by the layer and used by the pr...
virtual QString name() const =0
Returns a provider name.
Wrapper for iterator of features from vector data provider or vector layer.
QgsWkbTypes::Type wkbType() const override=0
Returns the geometry type which is returned by this layer.
virtual bool isValid() const =0
Returns true if this is a valid layer.
virtual void updateExtents()
Update the extents of the layer.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate system for the data source.