QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
QgsTopologyPreservingSimplifier Class Reference

Implementation of GeometrySimplifier using the Douglas-Peucker algorithm. More...

#include <qgsgeometrysimplifier.h>

Inheritance diagram for QgsTopologyPreservingSimplifier:
Inheritance graph
[legend]

Public Member Functions

 QgsTopologyPreservingSimplifier (double tolerance)
 Implementation of GeometrySimplifier using the Douglas-Peucker algorithm.
virtual ~QgsTopologyPreservingSimplifier ()
virtual QgsGeometrysimplify (QgsGeometry *geometry) const
 Returns a simplified version the specified geometry.
virtual bool simplifyGeometry (QgsGeometry *geometry) const
 Simplifies the specified geometry.
- Public Member Functions inherited from QgsAbstractGeometrySimplifier
virtual ~QgsAbstractGeometrySimplifier ()

Protected Attributes

double mTolerance
 Distance tolerance for the simplification.

Additional Inherited Members

- Static Public Member Functions inherited from QgsAbstractGeometrySimplifier
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

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.

Constructor & Destructor Documentation

QgsTopologyPreservingSimplifier::QgsTopologyPreservingSimplifier ( double  tolerance)

Implementation of GeometrySimplifier using the Douglas-Peucker algorithm.

QgsTopologyPreservingSimplifier::~QgsTopologyPreservingSimplifier ( )
virtual

Member Function Documentation

QgsGeometry * QgsTopologyPreservingSimplifier::simplify ( QgsGeometry geometry) const
virtual

Returns a simplified version the specified geometry.

Implements QgsAbstractGeometrySimplifier.

bool QgsTopologyPreservingSimplifier::simplifyGeometry ( QgsGeometry geometry) const
virtual

Simplifies the specified geometry.

Implements QgsAbstractGeometrySimplifier.

Member Data Documentation

double QgsTopologyPreservingSimplifier::mTolerance
protected

Distance tolerance for the simplification.


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