QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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.
Simplify using the map2pixel data to optimize the rendering of geometries.
double tolerance() const
Gets the tolerance of simplification.
No simplification is applied.
bool mForceLocalOptimization
Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries.
double mTolerance
Tolerance of simplification, it represents the maximum distance between two coordinates which can be ...
This class contains information about how to simplify geometries fetched from a QgsFeatureIterator.
Abstract base class for simplify geometries using a specific algorithm.
MethodType methodType() const
Gets the simplification type.
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.