QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
vector
geometry_checker
qgsgeometryisvalidcheck.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgeometryisvalidcheck.h
3
--------------------------------------
4
Date : 7.9.2018
5
Copyright : (C) 2018 by Matthias Kuhn
6
email : matthias@opengis.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
#ifndef QGSGEOMETRYISVALIDCHECK_H
17
#define QGSGEOMETRYISVALIDCHECK_H
18
19
20
#include "
qgssinglegeometrycheck.h
"
21
22
#define SIP_NO_FILE
23
33
class
ANALYSIS_EXPORT
QgsGeometryIsValidCheckError
:
public
QgsSingleGeometryCheckError
34
{
35
public
:
39
QgsGeometryIsValidCheckError
(
const
QgsSingleGeometryCheck
*
check
,
const
QgsGeometry
&geometry,
const
QgsGeometry
&
errorLocation
,
const
QString &errorDescription );
40
41
QString
description
()
const override
;
42
43
private
:
44
QString mDescription;
45
};
46
55
class
ANALYSIS_EXPORT
QgsGeometryIsValidCheck
:
public
QgsSingleGeometryCheck
56
{
57
Q_DECLARE_TR_FUNCTIONS(
QgsGeometryIsValidCheck
)
58
public
:
62
explicit
QgsGeometryIsValidCheck
(
const
QgsGeometryCheckContext
*
context
,
const
QVariantMap &configuration );
63
64
QList<Qgis::GeometryType>
compatibleGeometryTypes
()
const override
;
65
QList<QgsSingleGeometryCheckError *>
processGeometry
(
const
QgsGeometry
&geometry )
const override
;
66
Q_DECL_DEPRECATED QStringList
resolutionMethods
()
const override
;
67
QString
description
()
const override
{
return
factoryDescription(); }
68
QString
id
()
const override
{
return
factoryId(); }
69
QgsGeometryCheck::CheckType
checkType
()
const override
{
return
factoryCheckType(); }
70
72
static
QList<Qgis::GeometryType> factoryCompatibleGeometryTypes()
SIP_SKIP
;
73
static
bool
factoryIsCompatible(
QgsVectorLayer
*layer )
SIP_SKIP
;
74
static QString factoryDescription()
SIP_SKIP
;
75
static QString factoryId()
SIP_SKIP
;
76
static
QgsGeometryCheck
::Flags factoryFlags()
SIP_SKIP
;
77
static
QgsGeometryCheck
::CheckType factoryCheckType()
SIP_SKIP
;
79
};
80
81
#endif
// QGSGEOMETRYISVALIDCHECK_H
QgsGeometryCheckContext
Base configuration for geometry checks.
Definition
qgsgeometrycheckcontext.h:32
QgsGeometryCheck
Base class for geometry checks.
Definition
qgsgeometrycheck.h:93
QgsGeometryCheck::CheckType
CheckType
The type of a check.
Definition
qgsgeometrycheck.h:149
QgsGeometryCheck::context
const QgsGeometryCheckContext * context() const
Returns the context.
Definition
qgsgeometrycheck.h:335
QgsGeometryIsValidCheckError::QgsGeometryIsValidCheckError
QgsGeometryIsValidCheckError(const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QString &errorDescription)
Creates a new is valid check error.
Definition
qgsgeometryisvalidcheck.cpp:93
QgsGeometryIsValidCheck::id
QString id() const override
Returns an id for this check.
Definition
qgsgeometryisvalidcheck.h:68
QgsGeometryIsValidCheck::resolutionMethods
Q_DECL_DEPRECATED QStringList resolutionMethods() const override
Returns a list of descriptions for available resolutions for errors.
Definition
qgsgeometryisvalidcheck.cpp:57
QgsGeometryIsValidCheck::checkType
QgsGeometryCheck::CheckType checkType() const override
Returns the check type.
Definition
qgsgeometryisvalidcheck.h:69
QgsGeometryIsValidCheck::QgsGeometryIsValidCheck
QgsGeometryIsValidCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Creates a new is valid check with the provided context.
Definition
qgsgeometryisvalidcheck.cpp:24
QgsGeometryIsValidCheck::processGeometry
QList< QgsSingleGeometryCheckError * > processGeometry(const QgsGeometry &geometry) const override
Check the geometry for errors.
Definition
qgsgeometryisvalidcheck.cpp:33
QgsGeometryIsValidCheck::description
QString description() const override
Returns a human readable description for this check.
Definition
qgsgeometryisvalidcheck.h:67
QgsGeometryIsValidCheck::compatibleGeometryTypes
QList< Qgis::GeometryType > compatibleGeometryTypes() const override
A list of geometry types for which this check can be performed.
Definition
qgsgeometryisvalidcheck.cpp:28
QgsGeometry
A geometry is the spatial representation of a feature.
Definition
qgsgeometry.h:267
QgsSingleGeometryCheckError::errorLocation
QgsGeometry errorLocation() const
The exact location of the error.
Definition
qgssinglegeometrycheck.cpp:87
QgsSingleGeometryCheckError::description
virtual QString description() const
A human readable description of this error.
Definition
qgssinglegeometrycheck.cpp:77
QgsSingleGeometryCheckError::QgsSingleGeometryCheckError
QgsSingleGeometryCheckError(const QgsSingleGeometryCheck *check, const QgsGeometry &geometry, const QgsGeometry &errorLocation, const QgsVertexId &vertexId=QgsVertexId())
Creates a new single geometry check error.
Definition
qgssinglegeometrycheck.h:44
QgsSingleGeometryCheckError::check
const QgsSingleGeometryCheck * check() const
The check that created this error.
Definition
qgssinglegeometrycheck.cpp:82
QgsSingleGeometryCheck
Base class for geometry checks for a single geometry without any context of the layer or other layers...
Definition
qgssinglegeometrycheck.h:148
QgsSingleGeometryCheck::QgsSingleGeometryCheck
QgsSingleGeometryCheck(const QgsGeometryCheckContext *context, const QVariantMap &configuration)
Creates a new single geometry check.
Definition
qgssinglegeometrycheck.h:153
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
qgssinglegeometrycheck.h
Generated on
for QGIS API Documentation by
1.17.0