QGIS API Documentation
3.99.0-Master (c03dd32cbdd)
Loading...
Searching...
No Matches
src
analysis
vector
geometry_checker
qgsgeometrysliverpolygoncheck.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgeometrysliverpolygoncheck.h
3
---------------------
4
begin : September 2015
5
copyright : (C) 2014 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_SLIVERPOLYGON_CHECK_H
18
#define QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H
19
20
#include "
qgsgeometryareacheck.h
"
21
22
#include <QString>
23
24
#define SIP_NO_FILE
25
26
using namespace
Qt::StringLiterals;
27
32
class
ANALYSIS_EXPORT
QgsGeometrySliverPolygonCheck
:
public
QgsGeometryAreaCheck
33
{
34
public
:
35
QgsGeometrySliverPolygonCheck
(
QgsGeometryCheckContext
*
context
,
const
QVariantMap &configuration )
36
:
QgsGeometryAreaCheck
(
context
, configuration )
37
{
38
mThresholdMapUnits =
configurationValue<double>
(
"threshold"
);
39
mMaxArea =
configurationValue<double>
(
"maxArea"
);
40
}
41
QString
description
()
const override
{
return
factoryDescription(); }
42
QString
id
()
const override
{
return
factoryId(); }
43
44
private
:
45
static
QString factoryDescription() {
return
tr(
"Sliver polygon"
); }
46
static
QString factoryId() {
return
u
"QgsGeometrySliverPolygonCheck"
_s; }
47
48
bool
checkThreshold(
double
layerToMapUnits,
const
QgsAbstractGeometry *geom,
double
&value )
const override
;
49
50
double
mThresholdMapUnits = 0;
51
double
mMaxArea = 0;
52
};
53
54
#endif
// QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H
QgsGeometryAreaCheck::QgsGeometryAreaCheck
QgsGeometryAreaCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)
Definition
qgsgeometryareacheck.h:47
QgsGeometryCheckContext
Base configuration for geometry checks.
Definition
qgsgeometrycheckcontext.h:32
QgsGeometryCheck::configurationValue
T configurationValue(const QString &name, const QVariant &defaultValue=QVariant())
Returns the configuration value with the name, saved in the QGIS settings for this geometry check.
Definition
qgsgeometrycheck.h:252
QgsGeometryCheck::context
const QgsGeometryCheckContext * context() const
Returns the context.
Definition
qgsgeometrycheck.h:341
QgsGeometrySliverPolygonCheck::id
QString id() const override
Returns an id for this check.
Definition
qgsgeometrysliverpolygoncheck.h:42
QgsGeometrySliverPolygonCheck::description
QString description() const override
Returns a human readable description for this check.
Definition
qgsgeometrysliverpolygoncheck.h:41
QgsGeometrySliverPolygonCheck::QgsGeometrySliverPolygonCheck
QgsGeometrySliverPolygonCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)
Definition
qgsgeometrysliverpolygoncheck.h:35
qgsgeometryareacheck.h
Generated on
for QGIS API Documentation by
1.15.0