An interface for objects which provide features via a getFeatures method.
More...
#include <qgsfeaturesource.h>
An interface for objects which provide features via a getFeatures method.
- Since
- QGIS 3.0
Definition at line 37 of file qgsfeaturesource.h.
◆ FeatureAvailability
Possible return value for hasFeatures() to determine if a source is empty.
It is implemented as a three-value logic, so it can return if there are features available for sure, if there are no features available for sure or if there might be features available but there is no guarantee for this.
- Since
- QGIS 3.4
Enumerator |
---|
NoFeaturesAvailable | There are certainly no features available in this source.
|
FeaturesAvailable | There is at least one feature available in this source.
|
FeaturesMaybeAvailable | There may be features available in this source.
|
Definition at line 50 of file qgsfeaturesource.h.
◆ SpatialIndexPresence
Enumeration of spatial index presence states.
- Since
- QGIS 3.10.1
Enumerator |
---|
SpatialIndexUnknown | Spatial index presence cannot be determined, index may or may not exist.
|
SpatialIndexNotPresent | No spatial index exists for the source.
|
SpatialIndexPresent | A valid spatial index exists for the source.
|
Definition at line 187 of file qgsfeaturesource.h.
◆ ~QgsFeatureSource()
virtual QgsFeatureSource::~QgsFeatureSource |
( |
| ) |
|
|
virtualdefault |
◆ allFeatureIds()
◆ featureCount()
virtual long long QgsFeatureSource::featureCount |
( |
| ) |
const |
|
pure virtual |
◆ fields()
virtual QgsFields QgsFeatureSource::fields |
( |
| ) |
const |
|
pure virtual |
◆ getFeatures()
◆ hasFeatures()
◆ hasSpatialIndex()
◆ materialize()
Materializes a request (query) made against this feature source, by running it over the source and returning a new memory based vector layer containing the result.
All settings from feature request will be honored.
If a subset of attributes has been set for the request, then only those selected fields will be present in the output layer.
The CRS for the output layer will match the input layer, unless QgsFeatureRequest::setDestinationCrs() has been called with a valid QgsCoordinateReferenceSystem. In this case the output layer will match the QgsFeatureRequest::destinationCrs() CRS.
The returned layer WKB type will match wkbType(), unless the QgsFeatureRequest::NoGeometry flag is set on the request. In that case the returned layer will not be a spatial layer.
An optional feedback argument can be used to cancel the materialization before it has fully completed.
The returned value is a new instance and the caller takes responsibility for its ownership.
- Since
- QGIS 3.0
Definition at line 132 of file qgsfeaturesource.cpp.
◆ maximumValue()
QVariant QgsFeatureSource::maximumValue |
( |
int |
fieldIndex | ) |
const |
|
virtual |
◆ minimumValue()
QVariant QgsFeatureSource::minimumValue |
( |
int |
fieldIndex | ) |
const |
|
virtual |
◆ sourceCrs()
◆ sourceExtent()
◆ sourceName()
virtual QString QgsFeatureSource::sourceName |
( |
| ) |
const |
|
pure virtual |
◆ uniqueValues()
QSet< QVariant > QgsFeatureSource::uniqueValues |
( |
int |
fieldIndex, |
|
|
int |
limit = -1 |
|
) |
| const |
|
virtual |
◆ wkbType()
The documentation for this class was generated from the following files: