Class: QgsAbstractGeometrySimplifier¶
Abstract base class for simplifying geometries using a specific algorithm.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: simplify()
Class Hierarchy¶
Subclasses¶
Implementation of a geometry simplifier using the “MapToPixel” algorithm. |
|
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:
envelope (QgsRectangle)
mapToPixelTol (float = 1)
- Return type:
bool
- abstract 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
Noneif 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: