QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QgsSimplifyMethod Class Reference

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 More...
 
 QgsSimplifyMethod (const QgsSimplifyMethod &rh)
 copy constructor More...
 
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. More...
 
MethodType methodType () const
 Gets the simplification type. More...
 
QgsSimplifyMethodoperator= (const QgsSimplifyMethod &rh)
 assignment operator More...
 
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. More...
 
void setMethodType (MethodType methodType)
 Sets the simplification type. More...
 
void setTolerance (double tolerance)
 Sets the tolerance of simplification. Represents the maximum distance between two coordinates which can be considered equal. More...
 
double tolerance () const
 Gets the tolerance of simplification. More...
 

Static Public Member Functions

static
QgsAbstractGeometrySimplifier
createGeometrySimplifier (const QgsSimplifyMethod &simplifyMethod)
 Creates a geometry simplifier according to specified method. More...
 

Protected Attributes

bool mForceLocalOptimization
 Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries. More...
 
MethodType mMethodType
 Simplification method. More...
 
double mTolerance
 Tolerance of simplification, it represents the maximum distance between two coordinates which can be considered equal. More...
 

Detailed Description

This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.

Note
added in 2.2

Definition at line 25 of file qgssimplifymethod.h.

Member Enumeration Documentation

Enumerator
NoSimplification 

No simplification is applied.

OptimizeForRendering 

Simplify using the map2pixel data to optimize the rendering of geometries.

PreserveTopology 

Simplify using the Douglas-Peucker algorithm ensuring that the result is a valid geometry.

Definition at line 28 of file qgssimplifymethod.h.

Constructor & Destructor Documentation

QgsSimplifyMethod::QgsSimplifyMethod ( )

construct a default method

Definition at line 21 of file qgssimplifymethod.cpp.

QgsSimplifyMethod::QgsSimplifyMethod ( const QgsSimplifyMethod rh)

copy constructor

Definition at line 28 of file qgssimplifymethod.cpp.

Member Function Documentation

QgsAbstractGeometrySimplifier * QgsSimplifyMethod::createGeometrySimplifier ( const QgsSimplifyMethod simplifyMethod)
static

Creates a geometry simplifier according to specified method.

Definition at line 57 of file qgssimplifymethod.cpp.

bool QgsSimplifyMethod::forceLocalOptimization ( ) const
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.

MethodType QgsSimplifyMethod::methodType ( ) const
inline

Gets the simplification type.

Definition at line 45 of file qgssimplifymethod.h.

QgsSimplifyMethod & QgsSimplifyMethod::operator= ( const QgsSimplifyMethod rh)

assignment operator

Definition at line 33 of file qgssimplifymethod.cpp.

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.

void QgsSimplifyMethod::setMethodType ( MethodType  methodType)

Sets the simplification type.

Definition at line 42 of file qgssimplifymethod.cpp.

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.

double QgsSimplifyMethod::tolerance ( ) const
inline

Gets the tolerance of simplification.

Definition at line 50 of file qgssimplifymethod.h.

Member Data Documentation

bool QgsSimplifyMethod::mForceLocalOptimization
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.

MethodType QgsSimplifyMethod::mMethodType
protected

Simplification method.

Definition at line 62 of file qgssimplifymethod.h.

double QgsSimplifyMethod::mTolerance
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.


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