-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 fails when using a point and a polygon layer #44801
Comments
Intersection here works, while union does not and curiously the message error is "GEOS geoprocessing error: difference failed". |
@gioman Note that when saving the file (so not a temporary layer output), the layer is written with all features processed correctly. I presume the code catches the errors of polygons not being able to be written to the point layer, and assumes the process has failed. It might be that the error message is indeed difference failed... I translated from an other language |
@py-qgis-user add some sample data.
@py-qgis-user so for you the operations fail only when outputting to a temp layer, and work if saving to a gpkg, etc.? right? |
@py-qgis-user tried a few QGIS versions here, and in all intersection works (as expected I would say, as geometries are taken only from 1 input layer). Union doesn't work in recent versions, in this cases I always get the message
On older versions, like 3.14, Union works. The log says something llike
because of course different type of geometries cannot be saved within the same layer. Anyway the output is produced and it has all the geometries of the first input and the attribute table as it is expected from a Union operation. I'm not sure if this is a regression in QGIS or a changed behavior in some underlying library (GEOS). |
Probably the same applies for lines/polygons. |
@gioman I have not encountered the same problem for line input layers. About the I presume these are the polygon features that can not be written in the processed point layer.
|
Any news on this problem or aspects to check? @gioman ? |
@gioman @py-qgis-user For me it's normal. The difference between versions may come from GEOS. Do you have GEOS 3.9 with QGIS 3.16 and GEOS 3.8 in older versions? |
3.9.1. I assume i should as the GEOS community why the behaviour has changed. |
What is the bug or the crash?
In previous versions, geoprocessing (e.g. union, difference) worked, where the input layer was a point layer and the overlay layer was a polygon layer. It simply neglected that the overlay polygons could not be added to the point layer.
Since 3.16 this is not possible anymore. The processing will fail 'error GEOS geoprocessing: difference failed'
Is this a bug, or is it the new behaviour?
Steps to reproduce the issue
Create a point layer and add features
Create a polygon layer and add features
Perform Union with base Pointlayer and overlay Polygon layer
--> Error is 3.16, works in older versions.
Versions
3.16.8 Hannover
Additional context
No response
The text was updated successfully, but these errors were encountered: