Skip to content
Permalink
Browse files

Overlap check documentation

  • Loading branch information
m-kuhn committed Dec 22, 2018
1 parent 525a3da commit f2d4d877ecf92661c87b5bf7d70fcb699cc570ba
Showing with 30 additions and 2 deletions.
  1. +30 −2 src/analysis/vector/geometry_checker/qgsgeometryoverlapcheck.h
@@ -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.

0 comments on commit f2d4d87

Please sign in to comment.
You can’t perform that action at this time.