Bug report #3456
Difference between vectors is empty if one of the inputs has errors
|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|
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.
#5 Updated by Giovanni Manghi over 9 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 (
- Operating System deleted (
- Target version changed from Version 2.0.0 to Future Release - Nice to have
- Assignee deleted (
After the operation runs a clear message is given to the user
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 about 7 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.