17 #ifndef QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H 18 #define QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H 70 static float calculateLengthSquared2D(
double x1,
double y1,
double x2,
double y2 );
73 static bool equalSnapToGrid(
double x1,
double y1,
double x2,
double y2,
double gridOriginX,
double gridOriginY,
float gridInverseSizeXY );
98 static bool isGeneralizableByMapBoundingBox(
const QgsRectangle& envelope,
double map2pixelTol );
103 return isGeneralizableByMapBoundingBox( envelope, mTolerance );
113 #endif // QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H A rectangle specified with double values.
void setSimplifyFlags(int simplifyFlags)
Sets the simplification hints of the vector layer managed.
A geometry is the spatial representation of a feature.
WkbType
Used for symbology operations.
SimplifyAlgorithm
Types of simplification algorithms that can be used.
virtual bool simplifyGeometry(QgsGeometry *geometry) const =0
Simplifies the specified geometry.
SimplifyAlgorithm simplifyAlgorithm() const
Gets the local simplification algorithm of the vector layer managed.
int simplifyFlags() const
Gets the simplification hints of the vector layer managed.
Implementation of GeometrySimplifier using the "MapToPixel" algorithm.
double mTolerance
Distance tolerance for the simplification.
virtual QgsGeometry * simplify(QgsGeometry *geometry) const =0
Returns a simplified version the specified geometry.
void setSimplifyAlgorithm(SimplifyAlgorithm simplifyAlgorithm)
Sets the local simplification algorithm of the vector layer managed.
int mSimplifyFlags
Current simplification flags.
SimplifyAlgorithm mSimplifyAlgorithm
Current algorithm.
SimplifyFlag
Applicable simplification flags.
bool isGeneralizableByMapBoundingBox(const QgsRectangle &envelope) const
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel cont...
Abstract base class for simplify geometries using a specific algorithm.