QGIS API Documentation
3.99.0-Master (d270888f95f)
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
#define SIP_NO_FILE
17
18
#ifndef QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H
19
#define QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H
20
21
#include "
qgsgeometryareacheck.h
"
22
23
#include <QString>
24
25
using namespace
Qt::StringLiterals;
26
31
class
ANALYSIS_EXPORT
QgsGeometrySliverPolygonCheck
:
public
QgsGeometryAreaCheck
32
{
33
public
:
34
QgsGeometrySliverPolygonCheck
(
QgsGeometryCheckContext
*
context
,
const
QVariantMap &configuration )
35
:
QgsGeometryAreaCheck
(
context
, configuration )
36
{
37
mThresholdMapUnits =
configurationValue<double>
(
"threshold"
);
38
mMaxArea =
configurationValue<double>
(
"maxArea"
);
39
}
40
QString
description
()
const override
{
return
factoryDescription(); }
41
QString
id
()
const override
{
return
factoryId(); }
42
43
private
:
44
static
QString factoryDescription() {
return
tr(
"Sliver polygon"
); }
45
static
QString factoryId() {
return
u
"QgsGeometrySliverPolygonCheck"
_s; }
46
47
bool
checkThreshold(
double
layerToMapUnits,
const
QgsAbstractGeometry *geom,
double
&value )
const override
;
48
49
double
mThresholdMapUnits = 0;
50
double
mMaxArea = 0;
51
};
52
53
#endif
// QGS_GEOMETRY_SLIVERPOLYGON_CHECK_H
QgsGeometryAreaCheck::QgsGeometryAreaCheck
QgsGeometryAreaCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)
Definition
qgsgeometryareacheck.h:46
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:41
QgsGeometrySliverPolygonCheck::description
QString description() const override
Returns a human readable description for this check.
Definition
qgsgeometrysliverpolygoncheck.h:40
QgsGeometrySliverPolygonCheck::QgsGeometrySliverPolygonCheck
QgsGeometrySliverPolygonCheck(QgsGeometryCheckContext *context, const QVariantMap &configuration)
Definition
qgsgeometrysliverpolygoncheck.h:34
qgsgeometryareacheck.h
Generated on
for QGIS API Documentation by
1.15.0