mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	Includes unit test The equality operator is useful for unit tests, the inequality operator was added for completeness as requested by Nyall in https://github.com/qgis/QGIS/pull/45384#discussion_r734174883
		
			
				
	
	
		
			91 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			91 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgssimplifymethod.h                                         *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsSimplifyMethod
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| This class contains information about how to simplify geometries fetched from a :py:class:`QgsFeatureIterator`
 | |
| 
 | |
| .. versionadded:: 2.2
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgssimplifymethod.h"
 | |
| %End
 | |
|   public:
 | |
|     enum MethodType
 | |
|     {
 | |
|       NoSimplification,
 | |
|       OptimizeForRendering,
 | |
|       PreserveTopology
 | |
|     };
 | |
| 
 | |
|     QgsSimplifyMethod();
 | |
| %Docstring
 | |
| construct a default method
 | |
| %End
 | |
| 
 | |
|     void setMethodType( MethodType methodType );
 | |
| %Docstring
 | |
| Sets the simplification type
 | |
| %End
 | |
|     MethodType methodType() const;
 | |
| %Docstring
 | |
| Gets the simplification type
 | |
| %End
 | |
| 
 | |
|     void setTolerance( double tolerance );
 | |
| %Docstring
 | |
| Sets the tolerance of simplification in map units. Represents the maximum distance in map units between two coordinates which can be considered equal.
 | |
| %End
 | |
|     double tolerance() const;
 | |
| %Docstring
 | |
| Gets the tolerance of simplification in map units. Represents the maximum distance in map units between two coordinates which can be considered equal.
 | |
| %End
 | |
| 
 | |
|     void setThreshold( float threshold );
 | |
| %Docstring
 | |
| Sets the simplification threshold in pixels. Represents the maximum distance in pixels between two coordinates which can be considered equal.
 | |
| %End
 | |
|     float threshold() const;
 | |
| %Docstring
 | |
| Gets the simplification threshold in pixels. Represents the maximum distance in pixels between two coordinates which can be considered equal.
 | |
| %End
 | |
| 
 | |
|     void setForceLocalOptimization( bool localOptimization );
 | |
| %Docstring
 | |
| Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
 | |
| %End
 | |
|     bool forceLocalOptimization() const;
 | |
| %Docstring
 | |
| Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
 | |
| %End
 | |
| 
 | |
|     static QgsAbstractGeometrySimplifier *createGeometrySimplifier( const QgsSimplifyMethod &simplifyMethod );
 | |
| %Docstring
 | |
| Creates a geometry simplifier according to specified method
 | |
| %End
 | |
| 
 | |
|     bool operator==( const QgsSimplifyMethod &v ) const;
 | |
| 
 | |
|     bool operator!=( const QgsSimplifyMethod &v ) const;
 | |
| 
 | |
|   protected:
 | |
| };
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgssimplifymethod.h                                         *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 |