Class: QgsTopologyPreservingSimplifier

class qgis.core.QgsTopologyPreservingSimplifier(tolerance: float)

Bases: QgsAbstractGeometrySimplifier

Constructor for QgsTopologyPreservingSimplifier. The tolerance parameter is specified in layer units.

QgsTopologyPreservingSimplifier(QgsTopologyPreservingSimplifier)

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.

Parameters

tolerance

simplify(self, geometry: QgsGeometry)QgsGeometry
Parameters

geometry (QgsGeometry) –

Return type

QgsGeometry