New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Union & Intersection results are Incorrect #23878
Comments
Author Name: Giovanni Manghi (@gioman) There are different issues here, both in QGIS (and that is very unfortunate) and in your data. The Union between your 'dissolved.shp' & 'wards.shp'fails because the "wards" layer has a lot of issue, both from a geometry point of view but also from a topology one, in fact the polygons that you probably expected to be adjacent are not, many of them have gaps, that at the end of the operation you see as "artifacts". If you give a pass trough Processing/v.clean using also the snapping parameter then the union works well. On the other hand the union/intersection of "areaA" and "areaB" does not works because in one of the two layers you have geometry errors (auto intersections and duplicate nodes). This errors are reported in the QGIS log after the operation runs, but of course this is NOT enough for the average user, a proper warning must be thrown. This is the error
Moreover while the intersection operation seems to work ok (after fixing those issues) the union one creates an output that smells rotten fish, in fact it seems to create duplicate geometries (see attached images). See also: #17905 I'm tagging as SEVERE all this geoprocessing issues because they MUST be fixed once for all.
|
Author Name: Amy Taylor (Amy Taylor) Re the union, I've been having issues with unexpected duplicated polygons in the results. Attached are two input shapefiles and the result of a QGIS union between these.
|
Author Name: Amy Taylor (Amy Taylor) Sorry, forgot to attach last image, screenshot of duplicated feature attached.
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman) see also #20192 for more intersection errors!
I observed, that for some datasets, the results of Overlay analysis are strange, and not at all what you expect. I've attached two sample datasets which show this. 2)Sample 2 consists of the data where I saw the issue for the first time. When you Union 'dissolved.shp' & 'wards.shp' you expect to get an layer with unioned shapes of all features , but you get some kind of data which is closer to a 'Difference'; But if you closely look, there are more artifacts present in the data. This might be related to Bugs #22799 & #17224 ,bu I'm not sure. It should also be noted that the input shapefiles were created in QGIS itself, so if there is any issue with incorrect Geometries, there might be a bug in the module which created these shapefiles as well. to I found some strange issues when running Intersect & Union from the Vector>>GeoProcessing Menu. I've reproduced this on QGIS 2.14.4 as well as 2.18.0 on Windows 8 I observed, that for some datasets, the results of Overlay analysis are strange, and not at all what you expect. I've attached two sample datasets which show this. 2)Sample 2 consists of the data where I saw the issue for the first time. When you Union 'dissolved.shp' & 'wards.shp' you expect to get an layer with unioned shapes of all features , but you get some kind of data which is closer to a 'Difference'; But if you closely look, there are more artifacts present in the data. This might be related to Bugs #22799 & #17224 ,bu I'm not sure. It should also be noted that the input shapefiles were created in QGIS itself, so if there is any issue with incorrect Geometries, there might be a bug in the module which created these shapefiles as well. |
Author Name: Giovanni Manghi (@gioman) In 2.18.7 the union operation with the provided dataset, that usually returned a wrong result, now is BROKEN 2017-05-12T19:08:56 2 Uncaught error while executing algorithm
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Sandro Santilli (@strk) I'm looking at an example sent by Giovanni Manghi, will report here what I see.
|
Author Name: Sandro Santilli (@strk) The example sent to me by Giovanni, with the instructions provided, results in an error sent to the user about the input having invalid geometries. It seems to be the correct behavior with regard to this ticket (which is about incorrect results), so this is still in a "cannot reproduce" state for me. This is as of fd7b52d in release-2_18 branch (which is what "Affected QGIS version" references). I'm closing again. Please consider filing a new ticket if it helps reducing the confusion between what was fixed and what not (as this one seems to be about many different cases)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman) Sandro Santilli wrote:
do not close important tickets that are all BUT fixed/solved, thanks. |
Author Name: Sandro Santilli (@strk)
|
Author Name: Sandro Santilli (@strk) Giovanni for tickets to be tractable there's a need of a recipe to reproduce the problem. This ticket is very vague in what it is saying. It's about wrong results, in its original report. Then it changed to "Wrong or Broken" later. Then was closed by a commit. At this moment it isn't clear at all what this issue is about.
|
Author Name: Giovanni Manghi (@gioman) Sandro Santilli wrote:
I already wrote to you the EXACT steps to replicate: take "sample1.zip", open areaA and areaB shapes. Do the intersection > wrong result. How difficult is that? |
Author Name: Giovanni Manghi (@gioman)
do you mean -seriously- that you do not know how it should look like the result of the intersection between 3/4 simple test polygons? come on... |
Author Name: Sandro Santilli (@strk) No, I meant that I don't get a WRONG result, but rather I get a FAILURE telling me (via GUI) that the operation cannot be completed. Here's a screencast: http://strk.kbt.io/tmp/vokoscreen-2017-05-16_12-37-05.mkv |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Devdatta Tengshe (@devdattaT)
Original Redmine Issue: 15962
Affected QGIS version: 2.18.11
Redmine category:processing/qgis
I found some strange issues when running Intersect & Union from the Vector>>GeoProcessing Menu. I've reproduced this on QGIS 2.14.4 as well as 2.18.0 on Windows 8
I observed, that for some datasets, the results of Overlay analysis are strange, and not at all what you expect. I've attached two sample datasets which show this.
1)Sample 1 consists of 2 shapefiles and the results of Union & Intersection. As you can see from the Image, this is not the results one should be getting.!Intersect1!
2)Sample 2 consists of the data where I saw the issue for the first time. When you Union 'dissolved.shp' & 'wards.shp' you expect to get an layer with unioned shapes of all features , but you get some kind of data which is closer to a 'Difference'; But if you closely look, there are more artifacts present in the data.
This might be related to Bugs #22799 & #17224 ,bu I'm not sure.
It should also be noted that the input shapefiles were created in QGIS itself, so if there is any issue with incorrect Geometries, there might be a bug in the module which created these shapefiles as well.
Related issue(s): #17224 (relates), #17905 (relates)
Redmine related issue(s): 8456, 9297
The text was updated successfully, but these errors were encountered: