Skip to content

Commit

Permalink
[processing] include invalid geometries in check validity alg
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jun 26, 2017
1 parent fa8b216 commit 1730bc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/algs/qgis/CheckValidity.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
QgsGeometry,
QgsFeature,
QgsField,
QgsFeatureRequest,
QgsFeatureSink,
QgsWkbTypes,
QgsProcessingUtils,
QgsFields,
QgsProcessingFeatureSource,
QgsProcessingParameterFeatureSource,
QgsProcessingParameterEnum,
QgsProcessingParameterFeatureSink,
Expand Down Expand Up @@ -129,7 +131,7 @@ def doCheck(self, method, parameters, context, feedback):
error_fields, QgsWkbTypes.Point, source.sourceCrs())
error_count = 0

features = source.getFeatures()
features = source.getFeatures(QgsFeatureRequest(), QgsProcessingFeatureSource.FlagSkipGeometryValidityChecks)
total = 100.0 / source.featureCount() if source.featureCount() else 0
for current, inFeat in enumerate(features):
if feedback.isCanceled():
Expand Down

1 comment on commit 1730bc9

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

Please sign in to comment.