QGIS API Documentation
2.2.0-Valmiera
|
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator. More...
#include <qgssimplifymethod.h>
Public Types | |
enum | MethodType { NoSimplification, OptimizeForRendering, PreserveTopology } |
Public Member Functions | |
QgsSimplifyMethod () | |
construct a default method | |
QgsSimplifyMethod (const QgsSimplifyMethod &rh) | |
copy constructor | |
QgsSimplifyMethod & | operator= (const QgsSimplifyMethod &rh) |
assignment operator | |
void | setMethodType (MethodType methodType) |
Sets the simplification type. | |
MethodType | methodType () const |
Gets the simplification type. | |
void | setTolerance (double tolerance) |
Sets the tolerance of simplification. Represents the maximum distance between two coordinates which can be considered equal. | |
double | tolerance () const |
Gets the tolerance of simplification. | |
void | setForceLocalOptimization (bool localOptimization) |
Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries. | |
bool | forceLocalOptimization () const |
Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries. |
Static Public Member Functions | |
static QgsAbstractGeometrySimplifier * | createGeometrySimplifier (const QgsSimplifyMethod &simplifyMethod) |
Creates a geometry simplifier according to specified method. |
Protected Attributes | |
MethodType | mMethodType |
Simplification method. | |
double | mTolerance |
Tolerance of simplification, it represents the maximum distance between two coordinates which can be considered equal. | |
bool | mForceLocalOptimization |
Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries. |
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
Definition at line 25 of file qgssimplifymethod.h.
Definition at line 28 of file qgssimplifymethod.h.
QgsSimplifyMethod::QgsSimplifyMethod | ( | ) |
construct a default method
Definition at line 21 of file qgssimplifymethod.cpp.
QgsSimplifyMethod::QgsSimplifyMethod | ( | const QgsSimplifyMethod & | rh | ) |
|
static |
Creates a geometry simplifier according to specified method.
Definition at line 57 of file qgssimplifymethod.cpp.
References methodType(), OptimizeForRendering, PreserveTopology, QgsDebugMsg, QgsMapToPixelSimplifier::SimplifyEnvelope, QgsMapToPixelSimplifier::SimplifyGeometry, and tolerance().
Referenced by QgsVectorLayerFeatureIterator::prepareSimplification(), and QgsAbstractFeatureIterator::prepareSimplification().
|
inline |
Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries.
Definition at line 55 of file qgssimplifymethod.h.
Referenced by QgsAbstractFeatureIterator::prepareSimplification().
|
inline |
Gets the simplification type.
Definition at line 45 of file qgssimplifymethod.h.
Referenced by createGeometrySimplifier(), QgsVectorLayerFeatureIterator::prepareSimplification(), QgsAbstractFeatureIterator::prepareSimplification(), and setMethodType().
QgsSimplifyMethod & QgsSimplifyMethod::operator= | ( | const QgsSimplifyMethod & | rh | ) |
assignment operator
Definition at line 33 of file qgssimplifymethod.cpp.
References mForceLocalOptimization, mMethodType, and mTolerance.
Referenced by QgsSimplifyMethod().
void QgsSimplifyMethod::setForceLocalOptimization | ( | bool | localOptimization | ) |
Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries.
Definition at line 52 of file qgssimplifymethod.cpp.
References mForceLocalOptimization.
Referenced by QgsVectorLayer::draw().
void QgsSimplifyMethod::setMethodType | ( | MethodType | methodType | ) |
Sets the simplification type.
Definition at line 42 of file qgssimplifymethod.cpp.
References methodType(), and mMethodType.
Referenced by QgsVectorLayer::draw().
void QgsSimplifyMethod::setTolerance | ( | double | tolerance | ) |
Sets the tolerance of simplification. Represents the maximum distance between two coordinates which can be considered equal.
Definition at line 47 of file qgssimplifymethod.cpp.
References mTolerance, and tolerance().
Referenced by QgsVectorLayer::draw().
|
inline |
Gets the tolerance of simplification.
Definition at line 50 of file qgssimplifymethod.h.
Referenced by createGeometrySimplifier(), and setTolerance().
|
protected |
Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries.
Definition at line 66 of file qgssimplifymethod.h.
Referenced by operator=(), and setForceLocalOptimization().
|
protected |
Simplification method.
Definition at line 62 of file qgssimplifymethod.h.
Referenced by operator=(), and setMethodType().
|
protected |
Tolerance of simplification, it represents the maximum distance between two coordinates which can be considered equal.
Definition at line 64 of file qgssimplifymethod.h.
Referenced by operator=(), and setTolerance().