QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsAbstractGeometrySimplifier Class Referenceabstract

Abstract base class for simplifying geometries using a specific algorithm. More...

#include <qgsgeometrysimplifier.h>

Inheritance diagram for QgsAbstractGeometrySimplifier:

Public Member Functions

virtual ~QgsAbstractGeometrySimplifier ()=default
virtual QgsAbstractGeometrysimplify (const QgsAbstractGeometry *geometry) const =0
 Returns a simplified version the specified geometry.
virtual QgsGeometry simplify (const QgsGeometry &geometry) const =0
 Returns a simplified version the specified geometry.

Static Public Member Functions

static bool isGeneralizableByDeviceBoundingBox (const QgsRectangle &envelope, float mapToPixelTol=1.0f)
 Returns whether the device-envelope can be replaced by its BBOX when is applied the specified tolerance.
static bool isGeneralizableByDeviceBoundingBox (const QVector< QPointF > &points, float mapToPixelTol=1.0f)
 Returns whether the device-geometry can be replaced by its BBOX when is applied the specified tolerance.

Detailed Description

Abstract base class for simplifying geometries using a specific algorithm.

Definition at line 34 of file qgsgeometrysimplifier.h.

Constructor & Destructor Documentation

◆ ~QgsAbstractGeometrySimplifier()

virtual QgsAbstractGeometrySimplifier::~QgsAbstractGeometrySimplifier ( )
virtualdefault

Member Function Documentation

◆ isGeneralizableByDeviceBoundingBox() [1/2]

bool QgsAbstractGeometrySimplifier::isGeneralizableByDeviceBoundingBox ( const QgsRectangle & envelope,
float mapToPixelTol = 1.0f )
static

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

Definition at line 25 of file qgsgeometrysimplifier.cpp.

◆ isGeneralizableByDeviceBoundingBox() [2/2]

bool QgsAbstractGeometrySimplifier::isGeneralizableByDeviceBoundingBox ( const QVector< QPointF > & points,
float mapToPixelTol = 1.0f )
static

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

Definition at line 30 of file qgsgeometrysimplifier.cpp.

◆ simplify() [1/2]

virtual QgsAbstractGeometry * QgsAbstractGeometrySimplifier::simplify ( const QgsAbstractGeometry * geometry) const
pure virtual

Returns a simplified version the specified geometry.

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

Caller takes ownership of the returned geometry.

Since
QGIS 3.18

Implemented in QgsMapToPixelSimplifier, and QgsTopologyPreservingSimplifier.

◆ simplify() [2/2]

virtual QgsGeometry QgsAbstractGeometrySimplifier::simplify ( const QgsGeometry & geometry) const
pure virtual

Returns a simplified version the specified geometry.

Implemented in QgsMapToPixelSimplifier, and QgsTopologyPreservingSimplifier.


The documentation for this class was generated from the following files: