LayerFeature class
A layer feature combination to uniquely identify and access a feature in a set of layers.
Contents
Constructors, destructors, conversion operators
- LayerFeature(const QgsFeaturePool* pool, const QgsFeature& feature, const QgsGeometryCheckContext* context, bool useMapCrs)
- Create a new layer/feature combination.
Public functions
- auto feature() const -> const QgsFeature&
- Returns the feature.
- auto geometry() const -> const QgsGeometry&
- Returns the geometry of this feature.
- auto id() const -> QString
- Returns a combination of the layerId and the feature id.
- auto layer() const -> QPointer<QgsVectorLayer>
- The layer.
- auto layerId() const -> QString
- The layer id.
- auto useMapCrs() const -> bool
- Returns if the geometry is reprojected to the map CRS or not.
Function documentation
QgsGeometryCheckerUtils:: LayerFeature:: LayerFeature(const QgsFeaturePool* pool,
const QgsFeature& feature,
const QgsGeometryCheckContext* context,
bool useMapCrs)
Create a new layer/feature combination.
The layer is defined by pool, feature needs to be from this layer. If useMapCrs is True, geometries will be reprojected to the mapCrs defined in context.
const QgsFeature& QgsGeometryCheckerUtils:: LayerFeature:: feature() const
Returns the feature.
The geometry will not be reprojected regardless of useMapCrs.
const QgsGeometry& QgsGeometryCheckerUtils:: LayerFeature:: geometry() const
Returns the geometry of this feature.
If useMapCrs was specified, it will already be reprojected into the CRS specified in the context specified in the constructor.