Bug report #7708
Union produces the wrong output (plus progress bar does not move, too big output, error messages in log)
|Affected QGIS version:||master||Regression?:|
|Operating System:||Easy fix?:|
|Pull Request or Patch supplied:||No||Resolution:||fixed|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||16619|
Use the "union" with the two attached shapes "inputA" and "inputB".
On master the operation will return a warning
Warnings: Feature geometry error: One or more output features ignored due to invalid geometry. GEOS geoprocessing error: One or more input features have invalid geometry. Some output geometries may be missing or invalid. Would you like to add the new layer anyway?
even if the two input shapefiles do not have any kind of invalid geometries.
The output is missing a whole part belonging to one of the two inputs.
This warning does not show on 1.8 and the output (I underline the word seems) correct, but I have doubts about it. At least makes more sense than the result obtained on master.
On the attributes side the results is wrong since a long ago, see #4567
#1 Updated by vinayan Parameswaran over 7 years ago
some discussions on user mailing list
#2 Updated by Giovanni Manghi about 7 years ago
Done again a round of tests, using the attached dataset, on the geometry side:
- the result in master is (still) completely wrong
- in QGIS 1.8 the result is also wrong, but less evident: have a look to a an accepted definition of "union"
and you will see that where features are overlapping, then in the union it is expected to have duplicated feature. In the attached result "union18", produced by QGIS 1.8, there areas where it is supposed to have overlapped/repeated features originating from overlapped parts in the input layers.
#4 Updated by Giovanni Manghi about 7 years ago
- Subject changed from union produces the wrong output on master to Union produces the wrong output (plus progress bar does not move, too big output, error messages in log)
Files attached to #7428 do show also other issues:
the progress bar does not move, the log full of messages like
Feature geometry not imported (OGR error: )
Feature creation error (OGR error: Pointer 'hFeat' is NULL in 'OGR_L_SetFeature'.
and a way too big output, 282MB for 2MB worth of inputs.
See also #7428
#6 Updated by Giovanni Manghi about 7 years ago
Daniel Vaz wrote:
Please see: https://github.com/qgis/Quantum-GIS/pull/760
It fix partially this issue
many thanks for your work!
I will test the patch, anyway the result of the union operation is (was) wrong also on qgis 1.8. The the above link (from an esri manual, but it could be other software/gis manual) about a common accepted definition of what the result should be.