QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
48 if ( featureCount > 0 )
65 QList< QgsGeometry > geoms;
84 return QStringLiteral(
"FALSE" );
88 return qobject_cast< const QgsVectorLayerTemporalProperties * >( layer->
temporalProperties() )->createFilterString( temporalContext, canvas->
temporalRange() );
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const FINAL
Queries the layer for features specified in request.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsCoordinateReferenceSystem crs
void combineExtentWith(const QgsRectangle &rect)
Expands the rectangle so that it covers both the original rectangle and the given rectangle.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
bool isTemporal() const
Returns true if the object's temporal range is enabled, and the object will be filtered when renderin...
void flashGeometries(const QList< QgsGeometry > &geometries, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem(), const QColor &startColor=QColor(255, 0, 0, 255), const QColor &endColor=QColor(255, 0, 0, 0), int flashes=3, int duration=500)
Causes a set of geometries to flash within the canvas.
Map canvas is a class for displaying all GIS data types on a canvas.
void setMinimal() SIP_HOLDGIL
Set a rectangle so that min corner is at max and max corner is at min.
QgsRectangle layerExtentToOutputExtent(const QgsMapLayer *layer, QgsRectangle extent) const
transform bounding box from layer's CRS to output CRS
static QList< QgsExpressionContextScope * > globalProjectLayerScopes(const QgsMapLayer *layer)
Creates a list of three scopes: global, layer's project and layer.
A rectangle specified with double values.
QgsFeatureRequest & setExpressionContext(const QgsExpressionContext &context)
Sets the expression context used to evaluate filter expressions.
static long zoomToMatchingFeatures(QgsMapCanvas *canvas, QgsVectorLayer *layer, const QString &filter)
Zooms a map canvas to features from the specified layer which match the given filter expression strin...
QgsFeatureRequest & setFilterExpression(const QString &expression)
Set the filter expression.
static long flashMatchingFeatures(QgsMapCanvas *canvas, QgsVectorLayer *layer, const QString &filter)
Flashes features from the specified layer which match the given filter expression string with a map c...
This class wraps a request for features to a vector layer (or directly its vector data provider).
QgsMapLayerTemporalProperties * temporalProperties() override
Returns the layer's temporal properties.
void setLayer(QgsVectorLayer *layer)
Sets the associated layer.
virtual bool isVisibleInTemporalRange(const QgsDateTimeRange &range) const
Returns true if the layer should be visible and rendered for the specified time range.
Encapsulates the context in which a QgsVectorLayer's temporal capabilities will be applied.
QgsFeatureRequest & setNoAttributes()
Set that no attributes will be fetched.
virtual bool isEmpty() const
Returns true if the geometry is empty.
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
void zoomToFeatureExtent(QgsRectangle &rect)
Zooms to feature extent.
const QgsDateTimeRange & temporalRange() const
Returns map canvas datetime range.
bool nextFeature(QgsFeature &f)
A geometry is the spatial representation of a feature.
Represents a vector layer which manages a vector based data sets.
bool hasGeometry() const
Returns true if the feature has an associated geometry.
QgsRectangle boundingBox() const
Returns the bounding box of the geometry.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Wrapper for iterator of features from vector data provider or vector layer.
static QString filterForLayer(QgsMapCanvas *canvas, QgsVectorLayer *layer)
Constructs a filter to use for selecting features from the given layer, in order to apply filters whi...