QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
QgsAbstractGeometrySimplifier Class Reference

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

#include <qgsgeometrysimplifier.h>

Inheritance diagram for QgsAbstractGeometrySimplifier:
Inheritance graph
[legend]

Public Member Functions

virtual ~QgsAbstractGeometrySimplifier ()
virtual QgsGeometrysimplify (QgsGeometry *geometry) const =0
 Returns a simplified version the specified geometry.
virtual bool simplifyGeometry (QgsGeometry *geometry) const =0
 Simplifies the specified geometry.

Static Public Member Functions

static bool canbeGeneralizedByDeviceBoundingBox (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 canbeGeneralizedByDeviceBoundingBox (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 simplify geometries using a specific algorithm.

Definition at line 25 of file qgsgeometrysimplifier.h.

Constructor & Destructor Documentation

QgsAbstractGeometrySimplifier::~QgsAbstractGeometrySimplifier ( )
virtual

Definition at line 20 of file qgsgeometrysimplifier.cpp.

Member Function Documentation

bool QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox ( 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.

References QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().

Referenced by QgsFillSymbolLayerV2::_renderPolygon(), canbeGeneralizedByDeviceBoundingBox(), and QgsSimpleLineSymbolLayerV2::renderPolyline().

bool QgsAbstractGeometrySimplifier::canbeGeneralizedByDeviceBoundingBox ( 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 31 of file qgsgeometrysimplifier.cpp.

References canbeGeneralizedByDeviceBoundingBox(), and MathUtils::max().

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

Returns a simplified version the specified geometry.

Implemented in QgsMapToPixelSimplifier, and QgsTopologyPreservingSimplifier.

virtual bool QgsAbstractGeometrySimplifier::simplifyGeometry ( QgsGeometry geometry) const
pure virtual

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