Overlap check documentation

This commit is contained in:
Matthias Kuhn 2018-12-22 11:04:13 +01:00
parent 525a3da3ab
commit f2d4d877ec
No known key found for this signature in database
GPG Key ID: A0E766808764D73F

View File

@ -21,7 +21,12 @@
#include "qgsgeometrycheck.h"
#include "qgsgeometrycheckerror.h"
/**
* \ingroup analysis
* An error of a QgsGeometryOverlapCheck.
*
* \since QGIS 3.4
*/
class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckError
{
public:
@ -46,12 +51,22 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckErro
QgsFeatureId mFeatureId;
};
/**
* Creates a new overlap check error for \a check and the \a layerFeature combination.
* The \a geometry and \a errorLocation ned to be in map coordinates.
* The \a value is the area of the overlapping area in map units.
* The \a overlappedFeature provides more details about the overlap.
*/
QgsGeometryOverlapCheckError( const QgsGeometryCheck *check,
const QgsGeometryCheckerUtils::LayerFeature &layerFeature,
const QgsGeometry &geometry,
const QgsPointXY &errorLocation,
const QVariant &value,
const QgsGeometryCheckerUtils::LayerFeature &overlappedFeature );
/**
* Returns the overlapped feature
*/
const OverlappedFeature &overlappedFeature() const { return mOverlappedFeature; }
bool isEqual( QgsGeometryCheckError *other ) const override
@ -90,11 +105,24 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckErro
OverlappedFeature mOverlappedFeature;
};
/**
* \ingroup analysis
* Checks if geometries overlap.
*
* \since QGIS 3.4
*/
class ANALYSIS_EXPORT QgsGeometryOverlapCheck : public QgsGeometryCheck
{
public:
enum ResolutionMethod { Subtract, NoChange };
/**
* Available resolution methods.
*/
enum ResolutionMethod
{
Subtract, //!< Subtract the overlap region from the polygon
NoChange //!< Do not change anything
};
/**
* Checks for overlapping polygons.