Class: QgsSimplifyMethod¶
- class qgis.core.QgsSimplifyMethod¶
Bases:
sip.wrapper
This class contains information about how to simplify geometries fetched from a
QgsFeatureIterator
New in version 2.2.
QgsSimplifyMethod() construct a default method
QgsSimplifyMethod(
QgsSimplifyMethod
)Methods
Creates a geometry simplifier according to specified method
Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
Gets the simplification type
Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
Sets the simplification type
Sets the simplification threshold in pixels.
Sets the tolerance of simplification in map units.
Gets the simplification threshold in pixels.
Gets the tolerance of simplification in map units.
Attributes
- class MethodType¶
Bases:
int
- NoSimplification = 0¶
- OptimizeForRendering = 1¶
- PreserveTopology = 2¶
- createGeometrySimplifier(simplifyMethod: QgsSimplifyMethod) QgsAbstractGeometrySimplifier ¶
Creates a geometry simplifier according to specified method
- Parameters:
simplifyMethod (QgsSimplifyMethod) –
- Return type:
- forceLocalOptimization(self) bool ¶
Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
- Return type:
bool
- methodType(self) QgsSimplifyMethod.MethodType ¶
Gets the simplification type
- Return type:
- setForceLocalOptimization(self, localOptimization: bool)¶
Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
- Parameters:
localOptimization (bool) –
- setMethodType(self, methodType: QgsSimplifyMethod.MethodType)¶
Sets the simplification type
- Parameters:
methodType (QgsSimplifyMethod.MethodType) –
- setThreshold(self, threshold: float)¶
Sets the simplification threshold in pixels. Represents the maximum distance in pixels between two coordinates which can be considered equal.
- Parameters:
threshold (float) –
- setTolerance(self, tolerance: float)¶
Sets the tolerance of simplification in map units. Represents the maximum distance in map units between two coordinates which can be considered equal.
- Parameters:
tolerance (float) –
- threshold(self) float ¶
Gets the simplification threshold in pixels. Represents the maximum distance in pixels between two coordinates which can be considered equal.
- Return type:
float
- tolerance(self) float ¶
Gets the tolerance of simplification in map units. Represents the maximum distance in map units between two coordinates which can be considered equal.
- Return type:
float