Class: QgsSimplifyMethod

class qgis.core.QgsSimplifyMethod

Bases: sip.wrapper

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

QgsSimplifyMethod() construct a default method

QgsSimplifyMethod(QgsSimplifyMethod)

Methods

createGeometrySimplifier

Creates a geometry simplifier according to specified method

forceLocalOptimization

Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries

methodType

Gets the simplification type

setForceLocalOptimization

Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries

setMethodType

Sets the simplification type

setThreshold

Sets the simplification threshold in pixels.

setTolerance

Sets the tolerance of simplification in map units.

threshold

Gets the simplification threshold in pixels.

tolerance

Gets the tolerance of simplification in map units.

Attributes

NoSimplification

OptimizeForRendering

PreserveTopology

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:

QgsAbstractGeometrySimplifier

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:

QgsSimplifyMethod.MethodType

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