QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
17 #ifndef QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H
18 #define QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H
20 #include "qgis_core.h"
47 SnappedToGridGlobal = 3,
63 static std::unique_ptr<QgsAbstractGeometry> simplifyGeometry(
int simplifyFlags, SimplifyAlgorithm simplifyAlgorithm,
const QgsAbstractGeometry &geometry,
double map2pixelTol,
bool isaLinearRing );
76 static float calculateLengthSquared2D(
double x1,
double y1,
double x2,
double y2 );
79 static bool equalSnapToGrid(
double x1,
double y1,
double x2,
double y2,
double gridOriginX,
double gridOriginY,
float gridInverseSizeXY );
102 static bool isGeneralizableByMapBoundingBox(
const QgsRectangle &envelope,
double map2pixelTol );
107 return isGeneralizableByMapBoundingBox( envelope, mTolerance );
111 #endif // QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H
void setSimplifyFlags(int simplifyFlags)
Sets the simplification hints of the vector layer managed.
SimplifyAlgorithm simplifyAlgorithm() const
Gets the local simplification algorithm of the vector layer managed.
void setTolerance(double value)
Sets the tolerance of the vector layer managed.
double mTolerance
Distance tolerance for the simplification.
int simplifyFlags() const
Gets the simplification hints of the vector layer managed.
SimplifyAlgorithm
Types of simplification algorithms that can be used.
Abstract base class for all geometries.
int mSimplifyFlags
Current simplification flags.
void setSimplifyAlgorithm(SimplifyAlgorithm simplifyAlgorithm)
Sets the local simplification algorithm of the vector layer managed.
SimplifyAlgorithm mSimplifyAlgorithm
Current algorithm.
bool isGeneralizableByMapBoundingBox(const QgsRectangle &envelope) const
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel cont...
virtual QgsGeometry simplify(const QgsGeometry &geometry) const =0
Returns a simplified version the specified geometry.
SimplifyFlag
Applicable simplification flags.