QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
Implementation of GeometrySimplifier using the Douglas-Peucker algorithm. More...
#include <qgsgeometrysimplifier.h>
Public Member Functions | |
QgsTopologyPreservingSimplifier (double tolerance) | |
Constructor for QgsTopologyPreservingSimplifier. More... | |
QgsGeometry | simplify (const QgsGeometry &geometry) const override |
Returns a simplified version the specified geometry. More... | |
![]() | |
virtual | ~QgsAbstractGeometrySimplifier ()=default |
Protected Attributes | |
double | mTolerance |
Distance tolerance for the simplification. More... | |
Additional Inherited Members | |
![]() | |
static bool | isGeneralizableByDeviceBoundingBox (const QgsRectangle &envelope, float mapToPixelTol=1.0f) |
Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance. More... | |
static bool | isGeneralizableByDeviceBoundingBox (const QVector< QPointF > &points, float mapToPixelTol=1.0f) |
Returns whether the device-geometry can be replaced by its BBOX when is applied the specified tolerance. More... | |
Implementation of GeometrySimplifier using the Douglas-Peucker algorithm.
Simplifies a geometry, ensuring that the result is a valid geometry having the same dimension and number of components as the input. The simplification uses a maximum distance difference algorithm similar to the one used in the Douglas-Peucker algorithm.
Definition at line 57 of file qgsgeometrysimplifier.h.
QgsTopologyPreservingSimplifier::QgsTopologyPreservingSimplifier | ( | double | tolerance | ) |
Constructor for QgsTopologyPreservingSimplifier.
The tolerance parameter is specified in layer units.
Definition at line 41 of file qgsgeometrysimplifier.cpp.
|
overridevirtual |
Returns a simplified version the specified geometry.
Implements QgsAbstractGeometrySimplifier.
Definition at line 45 of file qgsgeometrysimplifier.cpp.
|
protected |
Distance tolerance for the simplification.
Definition at line 71 of file qgsgeometrysimplifier.h.