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;
This class contains information how to simplify geometries fetched from a vector layer.
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,...
float maximumScale() const
Gets the maximum scale at which the layer should be simplified.
void setThreshold(float threshold)
Sets the simplification threshold of the vector layer managed.
void setForceLocalOptimization(bool localOptimization)
Sets where the simplification executes, after fetch the geometries from provider, or when supported,...
SimplifyHints simplifyHints() const
Gets the simplification hints of the vector layer managed.
void setTolerance(double tolerance)
Sets the tolerance of simplification in map units. Represents the maximum distance in map units betwe...
SimplifyAlgorithm simplifyAlgorithm() const
Gets the local simplification algorithm of the vector layer managed.
float threshold() const
Gets the simplification threshold of the vector layer managed.
SimplifyHint
Simplification flags for fast rendering of features.
SimplifyAlgorithm
Types of local simplification algorithms that can be used.
@ Distance
The simplification uses the distance between points to remove duplicate points.
void setMaximumScale(float maximumScale)
Sets the maximum scale at which the layer should be simplified.
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.