QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
qgsvectorsimplifymethod.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsvectorsimplifymethod.h
3
---------------------
4
begin : December 2013
5
copyright : (C) 2013 by Alvaro Huarte
6
email : http://wiki.osgeo.org/wiki/Alvaro_Huarte
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 QGSVECTORSIMPLIFYMETHOD_H
17
#define QGSVECTORSIMPLIFYMETHOD_H
18
19
#include "
qgis.h
"
20
#include "qgis_core.h"
21
#include "
qgis_sip.h
"
22
23
#include <QFlags>
24
#include <QObject>
25
30
class
CORE_EXPORT
QgsVectorSimplifyMethod
31
{
32
Q_GADGET
33
public
:
35
QgsVectorSimplifyMethod
();
36
38
void
setSimplifyHints
(
Qgis::VectorRenderingSimplificationFlags
simplifyHints
) { mSimplifyHints =
simplifyHints
; }
40
inline
Qgis::VectorRenderingSimplificationFlags
simplifyHints
()
const
{
return
mSimplifyHints; }
41
43
void
setSimplifyAlgorithm
(
Qgis::VectorSimplificationAlgorithm
simplifyAlgorithm
) { mSimplifyAlgorithm =
simplifyAlgorithm
; }
45
inline
Qgis::VectorSimplificationAlgorithm
simplifyAlgorithm
()
const
{
return
mSimplifyAlgorithm; }
46
48
void
setTolerance
(
double
tolerance
) { mTolerance =
tolerance
; }
50
inline
double
tolerance
()
const
{
return
mTolerance; }
51
53
void
setThreshold
(
float
threshold
) { mThreshold =
threshold
; }
55
inline
float
threshold
()
const
{
return
mThreshold; }
56
58
void
setForceLocalOptimization
(
bool
localOptimization ) { mLocalOptimization = localOptimization; }
60
inline
bool
forceLocalOptimization
()
const
{
return
mLocalOptimization; }
61
63
void
setMaximumScale
(
float
maximumScale
) { mMaximumScale =
maximumScale
; }
65
inline
float
maximumScale
()
const
{
return
mMaximumScale; }
66
67
private
:
69
Qgis::VectorRenderingSimplificationFlags
mSimplifyHints;
71
Qgis::VectorSimplificationAlgorithm
mSimplifyAlgorithm =
Qgis::VectorSimplificationAlgorithm::Distance
;
73
double
mTolerance = 1;
75
float
mThreshold;
77
bool
mLocalOptimization =
true
;
79
float
mMaximumScale = 1;
80
};
81
82
83
#endif
// QGSVECTORSIMPLIFYMETHOD_H
Qgis::VectorRenderingSimplificationFlags
QFlags< VectorRenderingSimplificationFlag > VectorRenderingSimplificationFlags
Simplification flags for vector feature rendering.
Definition
qgis.h:3269
Qgis::VectorSimplificationAlgorithm
VectorSimplificationAlgorithm
Simplification algorithms for vector features.
Definition
qgis.h:3238
Qgis::VectorSimplificationAlgorithm::Distance
@ Distance
The simplification uses the distance between points to remove duplicate points.
Definition
qgis.h:3239
QgsVectorSimplifyMethod::tolerance
double tolerance() const
Gets the tolerance of simplification in map units. Represents the maximum distance in map units betwe...
Definition
qgsvectorsimplifymethod.h:50
QgsVectorSimplifyMethod::forceLocalOptimization
bool forceLocalOptimization() const
Gets where the simplification executes, after fetch the geometries from provider, or when supported,...
Definition
qgsvectorsimplifymethod.h:60
QgsVectorSimplifyMethod::simplifyHints
Qgis::VectorRenderingSimplificationFlags simplifyHints() const
Gets the simplification hints of the vector layer managed.
Definition
qgsvectorsimplifymethod.h:40
QgsVectorSimplifyMethod::maximumScale
float maximumScale() const
Gets the maximum scale at which the layer should be simplified.
Definition
qgsvectorsimplifymethod.h:65
QgsVectorSimplifyMethod::simplifyAlgorithm
Qgis::VectorSimplificationAlgorithm simplifyAlgorithm() const
Gets the local simplification algorithm of the vector layer managed.
Definition
qgsvectorsimplifymethod.h:45
QgsVectorSimplifyMethod::setThreshold
void setThreshold(float threshold)
Sets the simplification threshold of the vector layer managed.
Definition
qgsvectorsimplifymethod.h:53
QgsVectorSimplifyMethod::setForceLocalOptimization
void setForceLocalOptimization(bool localOptimization)
Sets where the simplification executes, after fetch the geometries from provider, or when supported,...
Definition
qgsvectorsimplifymethod.h:58
QgsVectorSimplifyMethod::setSimplifyHints
void setSimplifyHints(Qgis::VectorRenderingSimplificationFlags simplifyHints)
Sets the simplification hints of the vector layer managed.
Definition
qgsvectorsimplifymethod.h:38
QgsVectorSimplifyMethod::QgsVectorSimplifyMethod
QgsVectorSimplifyMethod()
construct a default object
Definition
qgsvectorsimplifymethod.cpp:22
QgsVectorSimplifyMethod::setTolerance
void setTolerance(double tolerance)
Sets the tolerance of simplification in map units. Represents the maximum distance in map units betwe...
Definition
qgsvectorsimplifymethod.h:48
QgsVectorSimplifyMethod::threshold
float threshold() const
Gets the simplification threshold of the vector layer managed.
Definition
qgsvectorsimplifymethod.h:55
QgsVectorSimplifyMethod::setMaximumScale
void setMaximumScale(float maximumScale)
Sets the maximum scale at which the layer should be simplified.
Definition
qgsvectorsimplifymethod.h:63
QgsVectorSimplifyMethod::setSimplifyAlgorithm
void setSimplifyAlgorithm(Qgis::VectorSimplificationAlgorithm simplifyAlgorithm)
Sets the local simplification algorithm of the vector layer managed.
Definition
qgsvectorsimplifymethod.h:43
qgis.h
qgis_sip.h
Generated on
for QGIS API Documentation by
1.17.0