Skip to content

Commit 1730bc9

Browse files
committedJun 26, 2017
[processing] include invalid geometries in check validity alg
1 parent fa8b216 commit 1730bc9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎python/plugins/processing/algs/qgis/CheckValidity.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@
3434
QgsGeometry,
3535
QgsFeature,
3636
QgsField,
37+
QgsFeatureRequest,
3738
QgsFeatureSink,
3839
QgsWkbTypes,
3940
QgsProcessingUtils,
4041
QgsFields,
42+
QgsProcessingFeatureSource,
4143
QgsProcessingParameterFeatureSource,
4244
QgsProcessingParameterEnum,
4345
QgsProcessingParameterFeatureSink,
@@ -129,7 +131,7 @@ def doCheck(self, method, parameters, context, feedback):
129131
error_fields, QgsWkbTypes.Point, source.sourceCrs())
130132
error_count = 0
131133

132-
features = source.getFeatures()
134+
features = source.getFeatures(QgsFeatureRequest(), QgsProcessingFeatureSource.FlagSkipGeometryValidityChecks)
133135
total = 100.0 / source.featureCount() if source.featureCount() else 0
134136
for current, inFeat in enumerate(features):
135137
if feedback.isCanceled():

1 commit comments

Comments
 (1)

nyalldawson commented on Jun 26, 2017

@nyalldawson
Collaborator

Perfect!

Please sign in to comment.