QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
qgssimplifymethod.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssimplifymethod.h
3  ---------------------
4  begin : December 2013
5  copyright : (C) 2013 by Matthias Kuhn / Alvaro Huarte
6  email :
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSSIMPLIFYMETHOD_H
17 #define QGSSIMPLIFYMETHOD_H
18 
20 
25 class CORE_EXPORT QgsSimplifyMethod
26 {
27  public:
29  {
32  PreserveTopology
33  };
34 
40  QgsSimplifyMethod& operator=( const QgsSimplifyMethod& rh );
41 
43  void setMethodType( MethodType methodType );
45  inline MethodType methodType() const { return mMethodType; }
46 
48  void setTolerance( double tolerance );
50  inline double tolerance() const { return mTolerance; }
51 
53  void setForceLocalOptimization( bool localOptimization );
55  inline bool forceLocalOptimization() const { return mForceLocalOptimization; }
56 
58  static QgsAbstractGeometrySimplifier* createGeometrySimplifier( const QgsSimplifyMethod& simplifyMethod );
59 
60  protected:
64  double mTolerance;
67 };
68 
69 #endif // QGSSIMPLIFYMETHOD_H
MethodType mMethodType
Simplification method.
Definition: qgssimplifymethod.h:62
Simplify using the map2pixel data to optimize the rendering of geometries.
Definition: qgssimplifymethod.h:31
double tolerance() const
Gets the tolerance of simplification.
Definition: qgssimplifymethod.h:50
No simplification is applied.
Definition: qgssimplifymethod.h:30
bool mForceLocalOptimization
Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries.
Definition: qgssimplifymethod.h:66
double mTolerance
Tolerance of simplification, it represents the maximum distance between two coordinates which can be ...
Definition: qgssimplifymethod.h:64
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
Definition: qgssimplifymethod.h:25
Abstract base class for simplify geometries using a specific algorithm.
Definition: qgsgeometrysimplifier.h:25
MethodType
Definition: qgssimplifymethod.h:28
MethodType methodType() const
Gets the simplification type.
Definition: qgssimplifymethod.h:45
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.
Definition: qgssimplifymethod.h:55