Class: QgsAbstractGeometrySimplifier

Abstract base class for simplify geometries using a specific algorithm

Class Hierarchy

Inheritance diagram of qgis.core.QgsAbstractGeometrySimplifier

Subclasses

QgsMapToPixelSimplifier

Implementation of GeometrySimplifier using the “MapToPixel” algorithm

QgsTopologyPreservingSimplifier

Implementation of GeometrySimplifier using the Douglas-Peucker algorithm

class qgis.core.QgsAbstractGeometrySimplifier[source]

Bases: object

static isGeneralizableByDeviceBoundingBox(envelope: QgsRectangle, mapToPixelTol: float = 1) bool[source]

Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance

isGeneralizableByDeviceBoundingBox(points: Iterable[Union[QPointF, QPoint]], mapToPixelTol: float = 1) -> bool Returns whether the device-geometry can be replaced by its BBOX when is applied the specified tolerance

Parameters:
Return type:

bool

simplify(self, geometry: QgsGeometry) QgsGeometry[source]

Returns a simplified version the specified geometry

simplify(self, geometry: Optional[QgsAbstractGeometry]) -> Optional[QgsAbstractGeometry] Returns a simplified version the specified geometry.

Will return None if no simplification is to be performed to the geometry.

Caller takes ownership of the returned geometry.

Added in version 3.18.

Parameters:

geometry (QgsGeometry)

Return type:

QgsGeometry