QGIS API Documentation 3.99.0-Master (d270888f95f)
Loading...
Searching...
No Matches
QgsGeometryCheckerUtils::LayerFeature Class Reference

A layer feature combination to uniquely identify and access a feature in a set of layers. More...

#include <qgsgeometrycheckerutils.h>

Public Member Functions

 LayerFeature (const QgsFeaturePool *pool, const QgsFeature &feature, const QgsGeometryCheckContext *context, bool useMapCrs)
 Create a new layer/feature combination.
QgsFeature feature () const
 Returns the feature.
QgsGeometry geometry () const
 Returns the geometry of this feature.
QString id () const
 Returns a combination of the layerId and the feature id.
QPointer< QgsVectorLayerlayer () const
 The layer.
QgsCoordinateReferenceSystem layerCrs () const
 The layer CRS.
QString layerId () const
 The layer id.
bool operator!= (const QgsGeometryCheckerUtils::LayerFeature &other) const
bool operator== (const QgsGeometryCheckerUtils::LayerFeature &other) const
bool useMapCrs () const
 Returns if the geometry is reprojected to the map CRS or not.

Detailed Description

A layer feature combination to uniquely identify and access a feature in a set of layers.

Since
QGIS 3.4

Definition at line 51 of file qgsgeometrycheckerutils.h.

Constructor & Destructor Documentation

◆ LayerFeature()

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.

Definition at line 36 of file qgsgeometrycheckerutils.cpp.

Member Function Documentation

◆ feature()

QgsFeature QgsGeometryCheckerUtils::LayerFeature::feature ( ) const

Returns the feature.

The geometry will not be reprojected regardless of useMapCrs.

Definition at line 56 of file qgsgeometrycheckerutils.cpp.

◆ geometry()

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.

Definition at line 76 of file qgsgeometrycheckerutils.cpp.

◆ id()

QString QgsGeometryCheckerUtils::LayerFeature::id ( ) const

Returns a combination of the layerId and the feature id.

Definition at line 81 of file qgsgeometrycheckerutils.cpp.

◆ layer()

QPointer< QgsVectorLayer > QgsGeometryCheckerUtils::LayerFeature::layer ( ) const

The layer.

Definition at line 66 of file qgsgeometrycheckerutils.cpp.

◆ layerCrs()

QgsCoordinateReferenceSystem QgsGeometryCheckerUtils::LayerFeature::layerCrs ( ) const

The layer CRS.

Definition at line 61 of file qgsgeometrycheckerutils.cpp.

◆ layerId()

QString QgsGeometryCheckerUtils::LayerFeature::layerId ( ) const

The layer id.

Definition at line 71 of file qgsgeometrycheckerutils.cpp.

◆ operator!=()

bool QgsGeometryCheckerUtils::LayerFeature::operator!= ( const QgsGeometryCheckerUtils::LayerFeature & other) const

Definition at line 91 of file qgsgeometrycheckerutils.cpp.

◆ operator==()

bool QgsGeometryCheckerUtils::LayerFeature::operator== ( const QgsGeometryCheckerUtils::LayerFeature & other) const

Definition at line 86 of file qgsgeometrycheckerutils.cpp.

◆ useMapCrs()

bool QgsGeometryCheckerUtils::LayerFeature::useMapCrs ( ) const

Returns if the geometry is reprojected to the map CRS or not.

Definition at line 114 of file qgsgeometrycheckerutils.cpp.


The documentation for this class was generated from the following files: