Bug report #20591
Dissolve tool failing to produce outputs
|Affected QGIS version:||3.4.1||Regression?:||No|
|Operating System:||Win 10 x64||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||28411|
I'm seeing very strange behaviour with a particular shapefile in QGIS 3.4.1. The data is attached
When I run the Vector Geometry > Dissolve Processing tool on it, no errors are raised, an output layer is created containing one row with no geometry. This happens regardless of the Processing 'Invalid features filtering' setting.
Running the GDAL > Vector geoprocessing > Dissolve tool on the data immediately returns an invalid geometry (self intersection) error, but running Vector Geometry > Check validity finds no errors using either the GEOS or QGIS engine. The ArcGIS Check Geometry tool also fails to find any errors.
If the Vector Geometry > Dissolve tool is run on a selection from the shapefile, it will complete successfully if all but one feature is selected, regardless of which feature is left unselected.
#2 Updated by Alessandro Pasotti over 2 years ago
- File qgis-dissolve-error.png added
- Status changed from Open to In Progress
- Assignee set to Alessandro Pasotti
Ok, first step was to show the error message (see attached).
Second step is to understand if the error message (which comes from GEOS library) makes sense.
#5 Updated by Andy Harfoot over 2 years ago
Does GDAL share the GEOS library in a QGIS install, or have its own copy? The QGIS processing dissolve tool does not produce an error, nor any output, but the GDAL tool produces the GEOS error that is in the screenshot, could this be due to a different version being used?
#6 Updated by Alessandro Pasotti over 2 years ago
I'm not an expert about windows, but I'm pretty sure that GDAL and QGIS use exactly the same shared GEOS library.
The error message was not shown in 3.4 QGIS Dissolve algorithm (I'm going to fix that) but the error was thrown from GEOS and it was visible in the debug log.
It's wierd that it worked in 2.18, I'll check it, but it is also possible that in 2.18 the algorithm implementation was completely different: a lot of code has changed from 2.x to 3.x.
#9 Updated by Nyall Dawson over 2 years ago
Even the older python dissolve tool used the geos library to dissolve. Your older 2.18.15 build will be using an earlier geos version, so I suspect that something has changed within geos which is causing this error. Likely if you upgraded to 2.18.23, which will come with the newer geos library, you'll also see this error.