mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
#8725-R: minor changes
This commit is contained in:
parent
22c0c79422
commit
8fb87f1828
@ -29,6 +29,9 @@ class QgsSimplifyMethod
|
||||
/** Gets the tolerance of simplification */
|
||||
double tolerance() const;
|
||||
|
||||
/** Returns the optimal tolerance for Douglas-Peucker simplification algorithms */
|
||||
double toleranceForDouglasPeuckerAlgorithms() const;
|
||||
|
||||
/** Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries */
|
||||
void setForceLocalOptimization( bool localOptimization );
|
||||
/** Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries */
|
||||
|
@ -53,6 +53,12 @@ void QgsSimplifyMethod::setForceLocalOptimization( bool localOptimization )
|
||||
{
|
||||
mForceLocalOptimization = localOptimization;
|
||||
}
|
||||
|
||||
double QgsSimplifyMethod::toleranceForDouglasPeuckerAlgorithms() const
|
||||
{
|
||||
//TODO: define more precise value, now, it is experimental but conservative
|
||||
return mTolerance / 5.0;
|
||||
}
|
||||
|
||||
QgsAbstractGeometrySimplifier* QgsSimplifyMethod::createGeometrySimplifier( const QgsSimplifyMethod& simplifyMethod )
|
||||
{
|
||||
|
@ -48,6 +48,9 @@ class CORE_EXPORT QgsSimplifyMethod
|
||||
//! Gets the tolerance of simplification
|
||||
inline double tolerance() const { return mTolerance; }
|
||||
|
||||
//! Returns the optimal tolerance for Douglas-Peucker simplification algorithms
|
||||
double toleranceForDouglasPeuckerAlgorithms() const;
|
||||
|
||||
//! Sets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
|
||||
void setForceLocalOptimization( bool localOptimization );
|
||||
//! Gets whether the simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries
|
||||
|
@ -309,7 +309,7 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause )
|
||||
|
||||
double tolerance = simplifyMethod.methodType() == QgsSimplifyMethod::OptimizeForRendering
|
||||
?
|
||||
simplifyMethod.tolerance() / 5.0f /* experimental */
|
||||
simplifyMethod.toleranceForDouglasPeuckerAlgorithms()
|
||||
:
|
||||
simplifyMethod.tolerance();
|
||||
|
||||
|
@ -1755,7 +1755,7 @@
|
||||
<item row="2" column="1" colspan="4">
|
||||
<widget class="QCheckBox" name="mSimplifyDrawingAtProvider">
|
||||
<property name="text">
|
||||
<string>Runs on provider side, otherwise it will execute once obtained the geometry from data source</string>
|
||||
<string>Simplify on provider side if possible</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1014,7 +1014,7 @@
|
||||
<item row="2" column="1" colspan="4">
|
||||
<widget class="QCheckBox" name="mSimplifyDrawingAtProvider">
|
||||
<property name="text">
|
||||
<string>Runs on provider side, otherwise it will execute once obtained the geometry from data source</string>
|
||||
<string>Simplify on provider side if possible</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user