Bug report #3456

Difference between vectors is empty if one of the inputs has errors

Added by alobo - over 8 years ago. Updated over 2 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Processing/QGIS
Affected QGIS version:master Regression?:
Operating System: Easy fix?:
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:13516

Description

The polygon PolygonAgricultureBefore (included as attachment) has a weird structure at the bottom,
probably a digitizing error. Then the difference After - Before is empty.
Not sure if this
is the logical outcome or just an eventuality that had not been considered.
The problem is solved by editing the polygon prior the operation, but perhaps this
error unveils something you want to fix.

PolygonAgriculture.zip (3.54 KB) alobo -, 2011-01-31 10:26 AM

History

#1 Updated by Alexander Bruy almost 8 years ago

  • Category changed from Vectors to 44
  • Pull Request or Patch supplied set to No

#2 Updated by Giovanni Manghi almost 8 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#3 Updated by Paolo Cavallini over 7 years ago

  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master

#4 Updated by Paolo Cavallini about 7 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#5 Updated by Giovanni Manghi about 6 years ago

  • Subject changed from Wrong difference between vectors in some cases to Difference between vectors is empty if one of the inputs has errors
  • Status info deleted (0)
  • Operating System deleted (All)
  • Target version changed from Version 2.0.0 to Future Release - Nice to have
  • Assignee deleted (cfarmer -)

After the operation runs a clear message is given to the user

Warnings:
GEOS geoprocessing error: One or more input features have invalid geometry.
Some output geometries may be missing or invalid.

I don't think there is much more that can be done (at least with a small/simple effort). Also now there are plenty of geometry/checking options.

What would be the ideal solution, does not allow to run at all any ftools tool if one of the inputs have errors?

#6 Updated by Médéric RIBREUX almost 4 years ago

  • Status changed from Open to Feedback

Hello, bug triage...

I think that we can't do anything for this one: as long as you have invalid geometries, the Difference tool will not work (actually perhaps any of Processing geometric tools will ever work with geometry errors).

Perhaps should we warn the user if invalid geometries have been encountered during processing (in Processing log) specifying what features are invalids ? In this case, we should rename this bug.

#7 Updated by Médéric RIBREUX over 3 years ago

  • Status changed from Feedback to Open

#8 Updated by Alexander Bruy over 3 years ago

  • Status changed from Open to Closed

Closed, as fTools and Processing generate clear message "GEOS geoprocessing error: One or more input features have invalid geometry.
Some output geometries may be missing or invalid."

Reopen if necessary

#9 Updated by Giovanni Manghi over 2 years ago

The "ftools" category is being removed from the tracker, changing the category of this ticket to "Processing/QGIS" to not leave the category orphaned.

Also available in: Atom PDF