Bug report #17132

Errors when running QGIS algorithms with inputs with geometry errors

Added by Giovanni Manghi over 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:High
Assignee:Nyall Dawson
Category:Processing/QGIS
Affected QGIS version:master Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25031

Description

Tested on QGIS master and with this https://github.com/qgis/QGIS/pull/5099 patched version of Processing (that backports some fixes/enhancements from master).

As sample project/dataset it can be used the first one contained here

https://issues.qgis.org/attachments/download/11399/union_intersection_test_datasets.zip

running tools (tested union and intersection) with the "AreaA" and "areaB" inputs (that have some geometry issues, auto-intersections) then on master the following is thrown:

Algorithm 'Union' starting...
Input parameters: {'INPUT': <QgsProcessingFeatureSourceDefinition {'source':AreaA20170911213135765, 'selectedFeaturesOnly': False}

, 'OUTPUT': <QgsProcessingOutputLayerDefinition {'sink':memory:, 'createOptions': {'fileEncoding': 'System'}}>, 'OVERLAY': <QgsProcessingFeatureSourceDefinition

{'source':AreaB20170911213135757, 'selectedFeaturesOnly': False}

}

Traceback (most recent call last): File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\algs\qgis\Union.py", line 101, in processAlgorithm indexB = QgsSpatialIndex(sourceB.getFeatures(QgsFeatureRequest().setSubsetOfAttributes([]).setDestinationCrs(sourceA.sourceCrs())), feedback) Exception: unknown
Execution failed after 0.04 seconds

on 2.18.12 the intersection operation is blocked with a clear message

GEOS geoprocessing error: One or more input features have invalid geometry.

while the union it is not (not even a message in the log), and a wrong results is produced and added to the project.

History

#1 Updated by Giovanni Manghi over 6 years ago

  • Description updated (diff)

#2 Updated by Giovanni Manghi over 6 years ago

This dataset

https://issues.qgis.org/attachments/download/11567/TestForBugs.zip

causes the buffer tool in QGIS 3 to lock completely the program (the layer has invalid geometries).

#3 Updated by Nyall Dawson over 6 years ago

  • Assignee changed from Victor Olaya to Nyall Dawson

#4 Updated by Steve Lowman over 6 years ago

This dataset

https://issues.qgis.org/attachments/download/11567/TestForBugs.zip

causes the buffer tool in QGIS 3 to lock completely the program (the layer has invalid geometries).

Additional resources, such as video demos and user experience reports are available at closed bug report #17291, where the above test file originated.

More recently, the OGR 'Buffer Vectors' tool has also been failing me, simply failing to run. This surprised me, as I had never seen such behaviour in the old fTools vector menu tool, and I thought I read somewhere they were the same algorithm. Something is not the same for those two anyway. It is a separate issue that I must report on its own, because this #17132 is about the QGIS tools, including 'Fixed Distance Buffer', not the OGR tool, and not the fTools tool.

#5 Updated by Nyall Dawson about 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixed in master

Also available in: Atom PDF