QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
vector
geometry_checker
qgsgeometryanglecheck.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgeometryanglecheck.h
3
---------------------
4
begin : September 2014
5
copyright : (C) 2015 by Sandro Mani / Sourcepole AG
6
email : smani at sourcepole dot ch
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
17
#ifndef QGS_GEOMETRY_ANGLE_CHECK_H
18
#define QGS_GEOMETRY_ANGLE_CHECK_H
19
20
#include "
qgsgeometrycheck.h
"
21
22
#include <QString>
23
24
#define SIP_NO_FILE
25
26
using namespace
Qt::StringLiterals;
27
32
class
ANALYSIS_EXPORT
QgsGeometryAngleCheck
:
public
QgsGeometryCheck
33
{
34
Q_DECLARE_TR_FUNCTIONS(
QgsGeometryAngleCheck
)
35
public
:
36
enum
ResolutionMethod
37
{
38
DeleteNode
,
39
NoChange
40
};
41
42
QgsGeometryAngleCheck
(
QgsGeometryCheckContext
*
context
,
const
QVariantMap &configuration )
43
:
QgsGeometryCheck
(
context
, configuration )
44
, mMinAngle( configuration.value( u
"minAngle"
_s, 0.0 ).toDouble() )
45
{}
46
47
QgsGeometryCheck::Result
collectErrors
(
48
const
QMap<QString, QgsFeaturePool *> &featurePools, QList<QgsGeometryCheckError *> &errors, QStringList &messages,
QgsFeedback
*feedback,
const
LayerFeatureIds &ids = LayerFeatureIds()
49
)
const override
;
50
void
fixError
(
const
QMap<QString, QgsFeaturePool *> &featurePools,
QgsGeometryCheckError
*error,
int
method,
const
QMap<QString, int> &mergeAttributeIndices, Changes &changes )
const override
;
51
52
QList<Qgis::GeometryType>
compatibleGeometryTypes
()
const override
;
53
Q_DECL_DEPRECATED QStringList
resolutionMethods
()
const override
;
54
QString
id
()
const override
;
55
QString
description
()
const override
;
56
QgsGeometryCheck::CheckType
checkType
()
const override
;
57
58
static
QList<Qgis::GeometryType> factoryCompatibleGeometryTypes()
SIP_SKIP
;
59
static
bool
factoryIsCompatible(
QgsVectorLayer
*layer )
SIP_SKIP
;
60
static QString factoryDescription()
SIP_SKIP
;
61
static QString factoryId()
SIP_SKIP
;
62
static
QgsGeometryCheck
::CheckType factoryCheckType()
SIP_SKIP
;
63
64
private:
65
double
mMinAngle;
66
};
67
68
#endif
// QGS_GEOMETRY_ANGLE_CHECK_H
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition
qgsfeedback.h:44
QgsGeometryAngleCheck::ResolutionMethod
ResolutionMethod
Definition
qgsgeometryanglecheck.h:37
QgsGeometryAngleCheck::DeleteNode
@ DeleteNode
Definition
qgsgeometryanglecheck.h:38
QgsGeometryAngleCheck::NoChange
@ NoChange
Definition
qgsgeometryanglecheck.h:39
QgsGeometryAngleCheck::QgsGeometryAngleCheck
QgsGeometryAngleCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)
Definition
qgsgeometryanglecheck.h:42
QgsGeometryCheckContext
Base configuration for geometry checks.
Definition
qgsgeometrycheckcontext.h:32
QgsGeometryCheckError
This represents an error reported by a geometry check.
Definition
qgsgeometrycheckerror.h:35
QgsGeometryCheck
Base class for geometry checks.
Definition
qgsgeometrycheck.h:93
QgsGeometryCheck::resolutionMethods
virtual Q_DECL_DEPRECATED QStringList resolutionMethods() const
Returns a list of descriptions for available resolutions for errors.
Definition
qgsgeometrycheck.cpp:93
QgsGeometryCheck::CheckType
CheckType
The type of a check.
Definition
qgsgeometrycheck.h:149
QgsGeometryCheck::id
virtual QString id() const =0
Returns an id for this check.
QgsGeometryCheck::Result
Result
Result of the geometry checker operation.
Definition
qgsgeometrycheck.h:157
QgsGeometryCheck::checkType
virtual CheckType checkType() const =0
Returns the check type.
QgsGeometryCheck::description
virtual QString description() const =0
Returns a human readable description for this check.
QgsGeometryCheck::fixError
virtual void fixError(const QMap< QString, QgsFeaturePool * > &featurePools, QgsGeometryCheckError *error, int method, const QMap< QString, int > &mergeAttributeIndices, Changes &changes) const
Fixes the error error with the specified method.
Definition
qgsgeometrycheck.cpp:64
QgsGeometryCheck::compatibleGeometryTypes
virtual QList< Qgis::GeometryType > compatibleGeometryTypes() const =0
A list of geometry types for which this check can be performed.
QgsGeometryCheck::QgsGeometryCheck
QgsGeometryCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Create a new geometry check.
Definition
qgsgeometrycheck.cpp:29
QgsGeometryCheck::context
const QgsGeometryCheckContext * context() const
Returns the context.
Definition
qgsgeometrycheck.h:335
QgsGeometryCheck::collectErrors
virtual Result collectErrors(const QMap< QString, QgsFeaturePool * > &featurePools, QList< QgsGeometryCheckError * > &errors, QStringList &messages, QgsFeedback *feedback, const LayerFeatureIds &ids=QgsGeometryCheck::LayerFeatureIds()) const
The main worker method.
Definition
qgsgeometrycheck.cpp:50
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
qgsgeometrycheck.h
Generated on
for QGIS API Documentation by
1.17.0