You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/core/qgssimplifymethod.sip
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,16 @@ class QgsSimplifyMethod
26
26
//! Gets the simplification type
27
27
MethodType methodType() const;
28
28
29
-
//! Sets the tolerance of simplification. Represents the maximum distance between two coordinates which can be considered equal
29
+
//! Sets the tolerance of simplification in map units. Represents the maximum distance between two coordinates which can be considered equal
30
30
void setTolerance( double tolerance );
31
-
//! Gets the tolerance of simplification
31
+
//! Gets the tolerance of simplification in map units
32
32
double tolerance() const;
33
33
34
+
//! Sets the simplification threshold in pixels. Represents the maximum distance in pixels between two coordinates which can be considered equal.
35
+
void setThreshold( float threshold );
36
+
//! Gets the simplification threshold in pixels. Represents the maximum distance in pixels between two coordinates which can be considered equal.
37
+
float threshold() const;
38
+
34
39
//! Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
//! Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
//! Sets the tolerance of simplification. Represents the maximum distance between two coordinates which can be considered equal
47
+
//! Sets the tolerance of simplification in map units. Represents the maximum distance in map units between two coordinates which can be considered equal.
48
48
voidsetTolerance( double tolerance );
49
-
//! Gets the tolerance of simplification
49
+
//! Gets the tolerance of simplification in map units . Represents the maximum distance in map units between two coordinates which can be considered equal.
//! Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
//! Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
@@ -62,6 +67,8 @@ class CORE_EXPORT QgsSimplifyMethod
62
67
MethodType mMethodType;
63
68
//! Tolerance of simplification, it represents the maximum distance between two coordinates which can be considered equal
64
69
doublemTolerance;
70
+
/** Simplification threshold */
71
+
floatmThreshold;
65
72
//! Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
.arg( mRequest.simplifyMethod().tolerance() * 0.8 ); //-> Default factor for the maximum displacement distance for simplification, similar as GeoServer does
420
+
.arg( simplifyPostgisMethod, geom )
421
+
.arg( mRequest.simplifyMethod().tolerance() * 0.8 ); //-> Default factor for the maximum displacement distance for simplification, similar as GeoServer does
422
+
423
+
// Post-simplification
424
+
if ( postSimplification )
425
+
{
426
+
geom = QString( "st_simplify( %1, %2, true )" )
427
+
.arg( geom )
428
+
.arg( mRequest.simplifyMethod().tolerance() * 0.7 ); //-> We use a smaller tolerance than pre-filtering to be on the safe side
0 commit comments