Skip to content
Permalink
Browse files

#8725-R: New vector provider capability for topological simplification

  • Loading branch information
ahuarte47 authored and m-kuhn committed Jan 15, 2014
1 parent 3b6ed3b commit f37b05621f980e5197b90299fca7d162269a2f85
@@ -200,6 +200,12 @@ QString QgsVectorDataProvider::capabilitiesString() const
QgsDebugMsg( "Capability: Simplify Geometries before fetch the feature" );
}

if ( abilities & QgsVectorDataProvider::SimplifyGeometriesWithTopologicalValidation )
{
abilitiesList += tr( "Simplify Geometries with topological validation" );
QgsDebugMsg( "Capability: Simplify Geometries before fetch the feature ensuring that the result is a valid geometry" );
}

return abilitiesList.join( ", " );

}
@@ -88,6 +88,8 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
SelectEncoding = 1 << 13,
/** supports simplification of geometries on provider side according to a distance tolerance */
SimplifyGeometries = 1 << 14,
/** supports topological simplification of geometries on provider side according to a distance tolerance */
SimplifyGeometriesWithTopologicalValidation = 1 << 15,
};

/** bitmask of all provider's editing capabilities */
@@ -1495,7 +1495,7 @@ int QgsOgrProvider::capabilities() const
}

// supports geometry simplification on provider side
ability |= QgsVectorDataProvider::SimplifyGeometries;
ability |= ( QgsVectorDataProvider::SimplifyGeometries | QgsVectorDataProvider::SimplifyGeometriesWithTopologicalValidation );
}

return ability;
@@ -994,7 +994,7 @@ bool QgsPostgresProvider::hasSufficientPermsAndCapabilities()
}

// supports geometry simplification on provider side
mEnabledCapabilities |= QgsVectorDataProvider::SimplifyGeometries;
mEnabledCapabilities |= ( QgsVectorDataProvider::SimplifyGeometries | QgsVectorDataProvider::SimplifyGeometriesWithTopologicalValidation );

return true;
}

0 comments on commit f37b056

Please sign in to comment.
You can’t perform that action at this time.