Class: QgsAbstractGeometrySimplifier¶
Abstract base class for simplify geometries using a specific algorithm
Class Hierarchy¶
Subclasses¶
Implementation of GeometrySimplifier using the “MapToPixel” algorithm  | 
|
Implementation of GeometrySimplifier using the Douglas-Peucker algorithm  | 
Methods
Returns a simplified version the specified geometry  | 
Static Methods
Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance  | 
- 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
- Parameters:
 envelope (
QgsRectangle)mapToPixelTol (float = 1)
- Return type:
 bool
- static isGeneralizableByDeviceBoundingBox(points: Iterable[QPointF | QPoint], mapToPixelTol: float = 1) bool[source]
 Returns whether the device-geometry can be replaced by its BBOX when is applied the specified tolerance
- Parameters:
 points (Iterable[Union[QPointF, QPoint]])
mapToPixelTol (float = 1)
- Return type:
 bool
- simplify(self, geometry: QgsGeometry) QgsGeometry[source]¶
 Returns a simplified version the specified geometry
- Parameters:
 geometry (
QgsGeometry)- Return type:
 
- simplify(self, geometry: QgsAbstractGeometry | None) QgsAbstractGeometry | None[source]
 Returns a simplified version the specified
geometry.Will return
Noneif no simplification is to be performed to the geometry.Caller takes ownership of the returned geometry.
Added in version 3.18.
- Parameters:
 geometry (Optional[QgsAbstractGeometry])
- Return type:
 Optional[QgsAbstractGeometry]