17#ifndef QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H
18#define QGSMAPTOPIXELGEOMETRYSIMPLIFIER_H
69 static float calculateLengthSquared2D(
double x1,
double y1,
double x2,
double y2 );
72 static bool equalSnapToGrid(
double x1,
double y1,
double x2,
double y2,
double gridOriginX,
double gridOriginY,
float gridInverseSizeXY );
95 static bool isGeneralizableByMapBoundingBox(
const QgsRectangle &envelope,
double map2pixelTol );
100 return isGeneralizableByMapBoundingBox( envelope, mTolerance );
VectorSimplificationAlgorithm
Simplification algorithms for vector features.
@ Distance
The simplification uses the distance between points to remove duplicate points.
Abstract base class for simplify geometries using a specific algorithm.
virtual QgsGeometry simplify(const QgsGeometry &geometry) const =0
Returns a simplified version the specified geometry.
Abstract base class for all geometries.
A geometry is the spatial representation of a feature.
Implementation of GeometrySimplifier using the "MapToPixel" algorithm.
bool isGeneralizableByMapBoundingBox(const QgsRectangle &envelope) const
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel cont...
double mTolerance
Distance tolerance for the simplification.
int simplifyFlags() const
Gets the simplification hints of the vector layer managed.
void setSimplifyFlags(int simplifyFlags)
Sets the simplification hints of the vector layer managed.
void setTolerance(double value)
Sets the tolerance of the vector layer managed.
void setSimplifyAlgorithm(Qgis::VectorSimplificationAlgorithm simplifyAlgorithm)
Sets the local simplification algorithm of the vector layer managed.
SimplifyFlag
Applicable simplification flags.
int mSimplifyFlags
Current simplification flags.
Qgis::VectorSimplificationAlgorithm simplifyAlgorithm() const
Gets the local simplification algorithm of the vector layer managed.
A rectangle specified with double values.