QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSVECTORSIMPLIFYMETHOD_H
17 #define QGSVECTORSIMPLIFYMETHOD_H
22 #include "qgis_core.h"
40 GeometrySimplification = 1,
41 AntialiasingSimplification = 2,
42 FullSimplification = 3,
44 Q_ENUM( SimplifyHint )
45 Q_DECLARE_FLAGS( SimplifyHints, SimplifyHint )
46 Q_FLAG( SimplifyHints )
49 void setSimplifyHints( SimplifyHints simplifyHints ) { mSimplifyHints = simplifyHints; }
59 SnappedToGridGlobal = 3,
61 Q_ENUM( SimplifyAlgorithm )
64 void setSimplifyAlgorithm(
SimplifyAlgorithm simplifyAlgorithm ) { mSimplifyAlgorithm = simplifyAlgorithm; }
71 inline double tolerance()
const {
return mTolerance; }
76 inline float threshold()
const {
return mThreshold; }
90 SimplifyHints mSimplifyHints;
94 double mTolerance = 1;
98 bool mLocalOptimization =
true;
100 float mMaximumScale = 1;
105 #endif // QGSVECTORSIMPLIFYMETHOD_H
void setForceLocalOptimization(bool localOptimization)
Sets where the simplification executes, after fetch the geometries from provider, or when supported,...
This class contains information how to simplify geometries fetched from a vector layer.
void setThreshold(float threshold)
Sets the simplification threshold of the vector layer managed.
SimplifyHint
Simplification flags for fast rendering of features.
SimplifyAlgorithm simplifyAlgorithm() const
Gets the local simplification algorithm of the vector layer managed.
float maximumScale() const
Gets the maximum scale at which the layer should be simplified.
@ Distance
The simplification uses the distance between points to remove duplicate points.
void setTolerance(double tolerance)
Sets the tolerance of simplification in map units. Represents the maximum distance in map units betwe...
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
float threshold() const
Gets the simplification threshold of the vector layer managed.
void setMaximumScale(float maximumScale)
Sets the maximum scale at which the layer should be simplified.
double tolerance() const
Gets the tolerance of simplification in map units. Represents the maximum distance in map units betwe...
bool forceLocalOptimization() const
Gets where the simplification executes, after fetch the geometries from provider, or when supported,...
SimplifyAlgorithm
Types of local simplification algorithms that can be used.
SimplifyHints simplifyHints() const
Gets the simplification hints of the vector layer managed.