QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
This class wraps a request for features to a vector layer (or directly its vector data provider). More...
#include <qgsfeaturerequest.h>
Classes | |
class | OrderBy |
Represents a list of OrderByClauses, with the most important first and the least important last. More... | |
class | OrderByClause |
The OrderByClause class represents an order by clause for a QgsFeatureRequest. More... | |
Public Types | |
enum | FilterType { FilterNone , FilterFid , FilterExpression , FilterFids } |
Types of filters. More... | |
enum | Flag { NoFlags = 0 , NoGeometry = 1 , SubsetOfAttributes = 2 , ExactIntersect = 4 , IgnoreStaticNodesDuringExpressionCompilation = 8 , EmbeddedSymbols = 16 } |
enum | InvalidGeometryCheck { GeometryNoCheck = 0 , GeometrySkipInvalid = 1 , GeometryAbortOnInvalid = 2 } |
Handling of features with invalid geometries. More... | |
Public Member Functions | |
QgsFeatureRequest () | |
construct a default request: for all features get attributes and geometries More... | |
QgsFeatureRequest (const QgsExpression &expr, const QgsExpressionContext &context=QgsExpressionContext()) | |
construct a request with a filter expression More... | |
QgsFeatureRequest (const QgsFeatureIds &fids) | |
construct a request with feature ID filter More... | |
QgsFeatureRequest (const QgsFeatureRequest &rh) | |
copy constructor More... | |
QgsFeatureRequest (const QgsRectangle &rectangle) | |
Construct a request with rectangle bounding box filter. More... | |
QgsFeatureRequest (QgsFeatureId fid) | |
construct a request with feature ID filter More... | |
~QgsFeatureRequest () | |
bool | acceptFeature (const QgsFeature &feature) |
Check if a feature is accepted by this requests filter. More... | |
QgsFeatureRequest & | addOrderBy (const QString &expression, bool ascending, bool nullsfirst) |
Adds a new OrderByClause, appending it as the least important one. More... | |
QgsFeatureRequest & | addOrderBy (const QString &expression, bool ascending=true) |
Adds a new OrderByClause, appending it as the least important one. More... | |
QgsFeatureRequest & | combineFilterExpression (const QString &expression) |
Modifies the existing filter expression to add an additional expression filter. More... | |
Q_DECL_DEPRECATED int | connectionTimeout () const |
Returns the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool at this moment. More... | |
QgsCoordinateReferenceSystem | destinationCrs () const |
Returns the destination coordinate reference system for feature's geometries, or an invalid QgsCoordinateReferenceSystem if no reprojection will be done and all features will be left with their original geometry. More... | |
QgsFeatureRequest & | disableFilter () |
Disables any attribute/ID filtering. More... | |
double | distanceWithin () const |
Returns the maximum distance from the referenceGeometry() of fetched features, if spatialFilterType() is Qgis::SpatialFilterType::DistanceWithin. More... | |
QgsExpressionContext * | expressionContext () |
Returns the expression context used to evaluate filter expressions. More... | |
QgsFeedback * | feedback () const |
Returns the feedback object that can be queried regularly by the iterator to check if it should be canceled, if set. More... | |
QgsExpression * | filterExpression () const |
Returns the filter expression (if set). More... | |
QgsFeatureId | filterFid () const |
Returns the feature ID that should be fetched. More... | |
const QgsFeatureIds & | filterFids () const |
Returns the feature IDs that should be fetched. More... | |
QgsRectangle | filterRect () const |
Returns the rectangle from which features will be taken. More... | |
FilterType | filterType () const |
Returns the attribute/ID filter type which is currently set on this request. More... | |
Flags | flags () const |
Returns the flags which affect how features are fetched. More... | |
std::function< void(const QgsFeature &) > | invalidGeometryCallback () const |
Returns the callback function to use when encountering an invalid geometry and invalidGeometryCheck() is set to GeometryAbortOnInvalid or GeometrySkipInvalid. More... | |
InvalidGeometryCheck | invalidGeometryCheck () const |
Returns the invalid geometry checking behavior. More... | |
long long | limit () const |
Returns the maximum number of features to request, or -1 if no limit set. More... | |
QgsFeatureRequest & | operator= (const QgsFeatureRequest &rh) |
Assignment operator. More... | |
OrderBy | orderBy () const |
Returns a list of order by clauses specified for this feature request. More... | |
QgsGeometry | referenceGeometry () const |
Returns the reference geometry used for spatial filtering of features. More... | |
std::shared_ptr< QgsGeometryEngine > | referenceGeometryEngine () const |
Returns the reference geometry engine used for spatial filtering of features. More... | |
bool | requestMayBeNested () const |
In case this request may be run nested within another already running iteration on the same connection, set this to true . More... | |
Q_DECL_DEPRECATED QgsFeatureRequest & | setConnectionTimeout (int connectionTimeout) |
Sets the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool at this moment. More... | |
QgsFeatureRequest & | setDestinationCrs (const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context) |
Sets the destination crs for feature's geometries. More... | |
QgsFeatureRequest & | setDistanceWithin (const QgsGeometry &geometry, double distance) |
Sets a reference geometry and a maximum distance from this geometry to retrieve features within. More... | |
QgsFeatureRequest & | setExpressionContext (const QgsExpressionContext &context) |
Sets the expression context used to evaluate filter expressions. More... | |
void | setFeedback (QgsFeedback *feedback) |
Attach a feedback object that can be queried regularly by the iterator to check if it should be canceled. More... | |
QgsFeatureRequest & | setFilterExpression (const QString &expression) |
Set the filter expression. More... | |
QgsFeatureRequest & | setFilterFid (QgsFeatureId fid) |
Sets the feature ID that should be fetched. More... | |
QgsFeatureRequest & | setFilterFids (const QgsFeatureIds &fids) |
Sets the feature IDs that should be fetched. More... | |
QgsFeatureRequest & | setFilterRect (const QgsRectangle &rectangle) |
Sets the rectangle from which features will be taken. More... | |
QgsFeatureRequest & | setFlags (QgsFeatureRequest::Flags flags) |
Sets flags that affect how features will be fetched. More... | |
QgsFeatureRequest & | setInvalidGeometryCallback (const std::function< void(const QgsFeature &)> &callback) |
Sets a callback function to use when encountering an invalid geometry and invalidGeometryCheck() is set to GeometryAbortOnInvalid or GeometrySkipInvalid. More... | |
QgsFeatureRequest & | setInvalidGeometryCheck (InvalidGeometryCheck check) |
Sets invalid geometry checking behavior. More... | |
QgsFeatureRequest & | setLimit (long long limit) |
Set the maximum number of features to request. More... | |
QgsFeatureRequest & | setNoAttributes () |
Set that no attributes will be fetched. More... | |
QgsFeatureRequest & | setOrderBy (const OrderBy &orderBy) |
Set a list of order by clauses. More... | |
QgsFeatureRequest & | setRequestMayBeNested (bool requestMayBeNested) |
In case this request may be run nested within another already running iteration on the same connection, set this to true . More... | |
QgsFeatureRequest & | setSimplifyMethod (const QgsSimplifyMethod &simplifyMethod) |
Set a simplification method for geometries that will be fetched. More... | |
QgsFeatureRequest & | setSubsetOfAttributes (const QgsAttributeList &attrs) |
Set a subset of attributes that will be fetched. More... | |
QgsFeatureRequest & | setSubsetOfAttributes (const QSet< QString > &attrNames, const QgsFields &fields) |
Sets a subset of attributes by names that will be fetched. More... | |
QgsFeatureRequest & | setSubsetOfAttributes (const QStringList &attrNames, const QgsFields &fields) |
Sets a subset of attributes by names that will be fetched. More... | |
QgsFeatureRequest & | setTimeout (int timeout) |
Sets the timeout (in milliseconds) for the maximum time we should wait during feature requests before a feature is returned. More... | |
QgsFeatureRequest & | setTransformErrorCallback (const std::function< void(const QgsFeature &)> &callback) |
Sets a callback function to use when encountering a transform error when iterating features and a destinationCrs() is set. More... | |
const QgsSimplifyMethod & | simplifyMethod () const |
Returns the simplification method for geometries that will be fetched. More... | |
Qgis::SpatialFilterType | spatialFilterType () const |
Returns the spatial filter type which is currently set on this request. More... | |
QgsAttributeList | subsetOfAttributes () const |
Returns the subset of attributes which at least need to be fetched. More... | |
int | timeout () const |
Returns the timeout (in milliseconds) for the maximum time we should wait during feature requests before a feature is returned. More... | |
QgsCoordinateTransformContext | transformContext () const |
Returns the transform context, for use when a destinationCrs() has been set and reprojection is required. More... | |
std::function< void(const QgsFeature &) > | transformErrorCallback () const |
Returns the callback function to use when encountering a transform error when iterating features and a destinationCrs() is set. More... | |
Static Public Attributes | |
static const QString | ALL_ATTRIBUTES = QStringLiteral( "#!allattributes!#" ) |
A special attribute that if set matches all attributes. More... | |
This class wraps a request for features to a vector layer (or directly its vector data provider).
The request may apply an attribute/ID filter to fetch only a particular subset of features. Currently supported filters:
Additionally a spatial filter can be set in combination with the attribute/ID filter. Supported spatial filters are:
For efficiency, it is also possible to tell provider that some data is not required:
The options may be chained, e.g.:
Examples:
Definition at line 83 of file qgsfeaturerequest.h.
Types of filters.
Enumerator | |
---|---|
FilterNone | No filter is applied. |
FilterFid | Filter using feature ID. |
FilterExpression | Filter using expression. |
FilterFids | Filter using feature IDs. |
Definition at line 100 of file qgsfeaturerequest.h.
Definition at line 86 of file qgsfeaturerequest.h.
Handling of features with invalid geometries.
Definition at line 109 of file qgsfeaturerequest.h.
QgsFeatureRequest::QgsFeatureRequest | ( | ) |
construct a default request: for all features get attributes and geometries
Definition at line 26 of file qgsfeaturerequest.cpp.
|
explicit |
construct a request with feature ID filter
Definition at line 32 of file qgsfeaturerequest.cpp.
|
explicit |
construct a request with feature ID filter
Definition at line 38 of file qgsfeaturerequest.cpp.
|
explicit |
Construct a request with rectangle bounding box filter.
When a destination CRS is set using setDestinationCrs(), rectangle is expected to be in the same CRS as the destinationCrs(). Otherwise, rectangle should use the same CRS as the source layer/provider.
Definition at line 45 of file qgsfeaturerequest.cpp.
|
explicit |
construct a request with a filter expression
Definition at line 51 of file qgsfeaturerequest.cpp.
QgsFeatureRequest::QgsFeatureRequest | ( | const QgsFeatureRequest & | rh | ) |
copy constructor
Definition at line 58 of file qgsfeaturerequest.cpp.
|
default |
bool QgsFeatureRequest::acceptFeature | ( | const QgsFeature & | feature | ) |
Check if a feature is accepted by this requests filter.
feature | The feature which will be tested |
true
, if the filter accepts the featureDefinition at line 314 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::addOrderBy | ( | const QString & | expression, |
bool | ascending, | ||
bool | nullsfirst | ||
) |
Adds a new OrderByClause, appending it as the least important one.
expression | The expression to use for ordering |
ascending | If the order should be ascending (1,2,3) or descending (3,2,1) |
nullsfirst | If true , NULLS are at the beginning, if false , NULLS are at the end |
Definition at line 199 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::addOrderBy | ( | const QString & | expression, |
bool | ascending = true |
||
) |
Adds a new OrderByClause, appending it as the least important one.
expression | The expression to use for ordering |
ascending | If the order should be ascending (1,2,3) or descending (3,2,1) If the order is ascending, by default nulls are last If the order is descending, by default nulls are first |
Definition at line 193 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::combineFilterExpression | ( | const QString & | expression | ) |
Modifies the existing filter expression to add an additional expression filter.
The filter expressions are combined using AND, so only features matching both the existing expression and the additional expression will be returned.
Calling this method will automatically set filterType() to QgsFeatureRequest::FilterExpression.
Definition at line 174 of file qgsfeaturerequest.cpp.
int QgsFeatureRequest::connectionTimeout | ( | ) | const |
Returns the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool at this moment.
A negative value (which is set by default) will wait forever.
Definition at line 369 of file qgsfeaturerequest.cpp.
QgsCoordinateReferenceSystem QgsFeatureRequest::destinationCrs | ( | ) | const |
Returns the destination coordinate reference system for feature's geometries, or an invalid QgsCoordinateReferenceSystem if no reprojection will be done and all features will be left with their original geometry.
Definition at line 291 of file qgsfeaturerequest.cpp.
|
inline |
Disables any attribute/ID filtering.
Calling this method will automatically set filterType() to QgsFeatureRequest::FilterNone.
Definition at line 589 of file qgsfeaturerequest.h.
|
inline |
Returns the maximum distance from the referenceGeometry() of fetched features, if spatialFilterType() is Qgis::SpatialFilterType::DistanceWithin.
When a destination CRS is set using setDestinationCrs(), the distance will be in the spatial units of destinationCrs(). Otherwise, the distance will use the same units as the CRS of the source layer/provider.
Definition at line 443 of file qgsfeaturerequest.h.
|
inline |
Returns the expression context used to evaluate filter expressions.
Definition at line 568 of file qgsfeaturerequest.h.
QgsFeedback * QgsFeatureRequest::feedback | ( | ) | const |
Returns the feedback object that can be queried regularly by the iterator to check if it should be canceled, if set.
Definition at line 407 of file qgsfeaturerequest.cpp.
|
inline |
Returns the filter expression (if set).
Definition at line 549 of file qgsfeaturerequest.h.
|
inline |
Returns the feature ID that should be fetched.
Definition at line 461 of file qgsfeaturerequest.h.
|
inline |
Returns the feature IDs that should be fetched.
Definition at line 479 of file qgsfeaturerequest.h.
QgsRectangle QgsFeatureRequest::filterRect | ( | ) | const |
Returns the rectangle from which features will be taken.
If the returned rectangle is null, then no filter rectangle is set.
If spatialFilterType() is Qgis::SpatialFilterType::BoundingBox then only features from within this bounding box will be fetched. If spatialFilterType() is Qgis::SpatialFilterType::DistanceWithin then the returned rectangle represents the bounding box of the referenceGeometry() extended by distanceWithin().
When a destination CRS is set using setDestinationCrs(), the rectangle will be in the same CRS as the destinationCrs(). Otherwise, the rectangle will use the same CRS as the source layer/provider.
Definition at line 117 of file qgsfeaturerequest.cpp.
|
inline |
Returns the attribute/ID filter type which is currently set on this request.
This type will automatically be set to the appropriate value whenever setFilterFid(), setFilterFids(), setFilterExpression() or disableFilter() are called.
Definition at line 342 of file qgsfeaturerequest.h.
|
inline |
Returns the flags which affect how features are fetched.
Definition at line 660 of file qgsfeaturerequest.h.
|
inline |
Returns the callback function to use when encountering an invalid geometry and invalidGeometryCheck() is set to GeometryAbortOnInvalid or GeometrySkipInvalid.
Definition at line 531 of file qgsfeaturerequest.h.
|
inline |
Returns the invalid geometry checking behavior.
Definition at line 495 of file qgsfeaturerequest.h.
|
inline |
Returns the maximum number of features to request, or -1 if no limit set.
Definition at line 643 of file qgsfeaturerequest.h.
QgsFeatureRequest & QgsFeatureRequest::operator= | ( | const QgsFeatureRequest & | rh | ) |
Assignment operator.
Definition at line 63 of file qgsfeaturerequest.cpp.
QgsFeatureRequest::OrderBy QgsFeatureRequest::orderBy | ( | ) | const |
Returns a list of order by clauses specified for this feature request.
Definition at line 205 of file qgsfeaturerequest.cpp.
|
inline |
Returns the reference geometry used for spatial filtering of features.
When spatialFilterType() is Qgis::SpatialFilterType::DistanceWithin then only features within distanceWithin() units of the reference geometry will be fetched.
When a destination CRS is set using setDestinationCrs(), the geometry will be in the same CRS as the destinationCrs(). Otherwise, the geometry will use the same CRS as the source layer/provider.
Definition at line 420 of file qgsfeaturerequest.h.
|
inline |
Returns the reference geometry engine used for spatial filtering of features.
This is to avoid re-creating the engine.
Definition at line 430 of file qgsfeaturerequest.h.
bool QgsFeatureRequest::requestMayBeNested | ( | ) | const |
In case this request may be run nested within another already running iteration on the same connection, set this to true
.
If this flag is true
, this request will be able to make use of "spare" connections to avoid deadlocks.
For example, this should be set on requests that are issued from an expression function.
Definition at line 391 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setConnectionTimeout | ( | int | connectionTimeout | ) |
Sets the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool at this moment.
A negative value (which is set by default) will wait forever.
Definition at line 374 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setDestinationCrs | ( | const QgsCoordinateReferenceSystem & | crs, |
const QgsCoordinateTransformContext & | context | ||
) |
Sets the destination crs for feature's geometries.
If set, all geometries will be reprojected from their original coordinate reference system to this desired reference system. If crs is an invalid QgsCoordinateReferenceSystem then no reprojection will be done and all features will be left with their original geometry.
When a crs is set using setDestinationCrs(), then any filterRect() or referenceGeometry() set on the request is expected to be in the same CRS as the destination CRS.
The feature geometry transformation to the destination CRS is performed after all filter expressions are tested and any virtual fields are calculated. Accordingly, any geometric expressions used in filterExpression() will be performed in the original source CRS. This ensures consistent results are returned regardless of the destination CRS. Similarly, virtual field values will be calculated using the original geometry in the source CRS, so these values are not affected by any destination CRS transform present in the feature request.
Definition at line 301 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setDistanceWithin | ( | const QgsGeometry & | geometry, |
double | distance | ||
) |
Sets a reference geometry and a maximum distance from this geometry to retrieve features within.
When a destination CRS is set using setDestinationCrs(), geometry is expected to be in the same CRS as the destinationCrs() and distance is in the spatial units of the destinationCrs(). Otherwise, geometry should use the same CRS as the source layer/provider and distance should use the spatial units as this same CRS.
Calling this method will automatically set spatialFilterType() to Qgis::SpatialFilterType::DistanceWithin.
Definition at line 122 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setExpressionContext | ( | const QgsExpressionContext & | context | ) |
Sets the expression context used to evaluate filter expressions.
Definition at line 187 of file qgsfeaturerequest.cpp.
void QgsFeatureRequest::setFeedback | ( | QgsFeedback * | feedback | ) |
Attach a feedback object that can be queried regularly by the iterator to check if it should be canceled.
Ownership of feedback is NOT transferred, and the caller must take care that it exists for the lifetime of the feature request and feature iterators.
Definition at line 402 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setFilterExpression | ( | const QString & | expression | ) |
Set the filter expression.
{
expression | expression string |
Calling this method will automatically set filterType() to QgsFeatureRequest::FilterExpression.
Definition at line 167 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setFilterFid | ( | QgsFeatureId | fid | ) |
Sets the feature ID that should be fetched.
Calling this method will automatically set filterType() to QgsFeatureRequest::FilterFid.
Definition at line 141 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setFilterFids | ( | const QgsFeatureIds & | fids | ) |
Sets the feature IDs that should be fetched.
Calling this method will automatically set filterType() to QgsFeatureRequest::FilterFids.
Definition at line 148 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setFilterRect | ( | const QgsRectangle & | rectangle | ) |
Sets the rectangle from which features will be taken.
An empty rectangle removes the filter.
When a destination CRS is set using setDestinationCrs(), rectangle is expected to be in the same CRS as the destinationCrs(). Otherwise, rectangle should use the same CRS as the source layer/provider.
Calling this method will automatically set spatialFilterType() to Qgis::SpatialFilterType::BoundingBox. If rectangle is a null rectangle then spatialFilterType() will be reset to Qgis::SpatialFilterType::NoFilter.
Definition at line 101 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setFlags | ( | QgsFeatureRequest::Flags | flags | ) |
Sets flags that affect how features will be fetched.
Definition at line 222 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setInvalidGeometryCallback | ( | const std::function< void(const QgsFeature &)> & | callback | ) |
Sets a callback function to use when encountering an invalid geometry and invalidGeometryCheck() is set to GeometryAbortOnInvalid or GeometrySkipInvalid.
This function will be called using the feature with invalid geometry as a parameter.
Definition at line 161 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setInvalidGeometryCheck | ( | QgsFeatureRequest::InvalidGeometryCheck | check | ) |
Sets invalid geometry checking behavior.
Definition at line 155 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setLimit | ( | long long | limit | ) |
Set the maximum number of features to request.
limit | maximum number of features, or -1 to request all features. |
Definition at line 216 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setNoAttributes | ( | ) |
Set that no attributes will be fetched.
To revert a call to setNoAttributes and fetch all or some available attributes, the SubsetOfAttributes flag should be removed from the request.
Definition at line 235 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setOrderBy | ( | const OrderBy & | orderBy | ) |
Set a list of order by clauses.
Definition at line 210 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setRequestMayBeNested | ( | bool | requestMayBeNested | ) |
In case this request may be run nested within another already running iteration on the same connection, set this to true
.
If this flag is true
, this request will be able to make use of "spare" connections to avoid deadlocks.
For example, this should be set on requests that are issued from an expression function.
Definition at line 396 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setSimplifyMethod | ( | const QgsSimplifyMethod & | simplifyMethod | ) |
Set a simplification method for geometries that will be fetched.
Definition at line 284 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setSubsetOfAttributes | ( | const QgsAttributeList & | attrs | ) |
Set a subset of attributes that will be fetched.
An empty attributes list indicates that no attributes will be fetched. To revert a call to setSubsetOfAttributes and fetch all available attributes, the SubsetOfAttributes flag should be removed from the request.
Definition at line 228 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setSubsetOfAttributes | ( | const QSet< QString > & | attrNames, |
const QgsFields & | fields | ||
) |
Sets a subset of attributes by names that will be fetched.
Definition at line 262 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setSubsetOfAttributes | ( | const QStringList & | attrNames, |
const QgsFields & | fields | ||
) |
Sets a subset of attributes by names that will be fetched.
Definition at line 240 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setTimeout | ( | int | timeout | ) |
Sets the timeout (in milliseconds) for the maximum time we should wait during feature requests before a feature is returned.
A negative value (which is set by default) will wait forever.
Definition at line 385 of file qgsfeaturerequest.cpp.
QgsFeatureRequest & QgsFeatureRequest::setTransformErrorCallback | ( | const std::function< void(const QgsFeature &)> & | callback | ) |
Sets a callback function to use when encountering a transform error when iterating features and a destinationCrs() is set.
This function will be called using the feature which encountered the transform error as a parameter.
Definition at line 308 of file qgsfeaturerequest.cpp.
|
inline |
Returns the simplification method for geometries that will be fetched.
Definition at line 752 of file qgsfeaturerequest.h.
|
inline |
Returns the spatial filter type which is currently set on this request.
This type will automatically be set to the appropriate value whenever setFilterRect(), or setDistanceWithin() are called.
Definition at line 356 of file qgsfeaturerequest.h.
|
inline |
Returns the subset of attributes which at least need to be fetched.
Definition at line 710 of file qgsfeaturerequest.h.
int QgsFeatureRequest::timeout | ( | ) | const |
Returns the timeout (in milliseconds) for the maximum time we should wait during feature requests before a feature is returned.
A negative value (which is set by default) will wait forever.
Definition at line 380 of file qgsfeaturerequest.cpp.
QgsCoordinateTransformContext QgsFeatureRequest::transformContext | ( | ) | const |
Returns the transform context, for use when a destinationCrs() has been set and reprojection is required.
Definition at line 296 of file qgsfeaturerequest.cpp.
|
inline |
Returns the callback function to use when encountering a transform error when iterating features and a destinationCrs() is set.
Definition at line 834 of file qgsfeaturerequest.h.
|
static |
A special attribute that if set matches all attributes.
Definition at line 304 of file qgsfeaturerequest.h.
|
protected |
Definition at line 984 of file qgsfeaturerequest.h.
|
protected |
Definition at line 991 of file qgsfeaturerequest.h.
|
protected |
Maximum distance from reference geometry.
Definition at line 977 of file qgsfeaturerequest.h.
|
protected |
Definition at line 982 of file qgsfeaturerequest.h.
|
protected |
Definition at line 995 of file qgsfeaturerequest.h.
|
protected |
Attribute/ID filter type.
Definition at line 950 of file qgsfeaturerequest.h.
|
protected |
Definition at line 981 of file qgsfeaturerequest.h.
|
protected |
Definition at line 979 of file qgsfeaturerequest.h.
|
protected |
Definition at line 980 of file qgsfeaturerequest.h.
|
protected |
Bounding box for spatial filtering.
Definition at line 962 of file qgsfeaturerequest.h.
|
protected |
Definition at line 983 of file qgsfeaturerequest.h.
|
protected |
Definition at line 989 of file qgsfeaturerequest.h.
|
protected |
Definition at line 988 of file qgsfeaturerequest.h.
|
protected |
Definition at line 986 of file qgsfeaturerequest.h.
|
protected |
Definition at line 987 of file qgsfeaturerequest.h.
|
protected |
Reference geometry for Qgis::RequestSpatialFilter::DistanceWithin filtering.
Definition at line 967 of file qgsfeaturerequest.h.
|
protected |
Prepared geometry engine for mReferenceGeometry.
Definition at line 972 of file qgsfeaturerequest.h.
|
protected |
Definition at line 994 of file qgsfeaturerequest.h.
|
protected |
Definition at line 985 of file qgsfeaturerequest.h.
|
protected |
|
protected |
Definition at line 993 of file qgsfeaturerequest.h.
|
protected |
Definition at line 992 of file qgsfeaturerequest.h.
|
protected |
Definition at line 990 of file qgsfeaturerequest.h.