QgsTopologyPreservingSimplifier class

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.

Base classes

class QgsAbstractGeometrySimplifier
Abstract base class for simplify geometries using a specific algorithm.

Constructors, destructors, conversion operators

QgsTopologyPreservingSimplifier(double tolerance)
Constructor for QgsTopologyPreservingSimplifier.

Public functions

auto simplify(const QgsGeometry& geometry) const -> QgsGeometry override
Returns a simplified version the specified geometry.

Protected variables

double mTolerance
Distance tolerance for the simplification.

Function documentation

QgsTopologyPreservingSimplifier::QgsTopologyPreservingSimplifier(double tolerance)

Constructor for QgsTopologyPreservingSimplifier.

The tolerance parameter is specified in layer units.