QGIS API Documentation
2.6.0-Brighton
|
Implementation of GeometrySimplifier using the "MapToPixel" algorithm. More...
#include <qgsmaptopixelgeometrysimplifier.h>
Public Types | |
enum | SimplifyFlag { NoFlags = 0, SimplifyGeometry = 1, SimplifyEnvelope = 2 } |
Applicable simplification flags. More... |
Public Member Functions | |
QgsMapToPixelSimplifier (int simplifyFlags, double tolerance) | |
virtual | ~QgsMapToPixelSimplifier () |
int | simplifyFlags () const |
void | setSimplifyFlags (int simplifyFlags) |
virtual QgsGeometry * | simplify (QgsGeometry *geometry) const |
Returns a simplified version the specified geometry. | |
virtual bool | simplifyGeometry (QgsGeometry *geometry) const |
Simplifies the specified geometry. | |
bool | isGeneralizableByMapBoundingBox (const QgsRectangle &envelope) const |
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context. | |
Public Member Functions inherited from QgsAbstractGeometrySimplifier | |
virtual | ~QgsAbstractGeometrySimplifier () |
Static Public Member Functions | |
static bool | isGeneralizableByMapBoundingBox (const QgsRectangle &envelope, double map2pixelTol) |
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context. | |
static bool | simplifyGeometry (QgsGeometry *geometry, int simplifyFlags, double tolerance) |
Simplifies the geometry when is applied the specified map2pixel context. | |
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. |
Static Protected Member Functions | |
static float | calculateLengthSquared2D (double x1, double y1, double x2, double y2) |
Returns the squared 2D-distance of the vector defined by the two points specified. |
Protected Attributes | |
int | mSimplifyFlags |
Current simplification flags. | |
double | mTolerance |
Distance tolerance for the simplification. |
Implementation of GeometrySimplifier using the "MapToPixel" algorithm.
Simplifies a geometry removing points within of the maximum distance difference that defines the MapToPixel info of a RenderContext request. This class enables simplify the geometries to be rendered in a MapCanvas target to speed up the vector drawing.
QgsMapToPixelSimplifier::QgsMapToPixelSimplifier | ( | int | simplifyFlags, |
double | tolerance | ||
) |
|
virtual |
|
staticprotected |
Returns the squared 2D-distance of the vector defined by the two points specified.
|
static |
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context.
|
inline |
Returns whether the envelope can be replaced by its BBOX when is applied the specified map2pixel context.
|
inline |
|
virtual |
Returns a simplified version the specified geometry.
Returns a simplified version the specified geometry (Removing duplicated points) when is applied the specified map2pixel context.
Implements QgsAbstractGeometrySimplifier.
|
inline |
|
virtual |
Simplifies the specified geometry.
Simplifies the geometry (Removing duplicated points) when is applied the specified map2pixel context.
Implements QgsAbstractGeometrySimplifier.
|
static |
Simplifies the geometry when is applied the specified map2pixel context.
Simplifies the geometry (Removing duplicated points) when is applied the specified map2pixel context.
|
protected |
Current simplification flags.
|
protected |
Distance tolerance for the simplification.