I want to union about 35 shape files. It works fine exept for one. There I get the error message:
Feature could not be written to Union_c27e002e_a281_4323_92d4_d4d3f97beb1e: Could not add feature with geometry type MultiLineString to layer of type MultiPolygon Could not write feature
Both geometries are Polygons (MultiPolygon) not MultiLineStrings as given in the error message. I tied both invalid filter featuring = 'Do not filter' and 'Skip (Ignore) Features with invaldid geometry'. Likewise, using the tool 'Fix geometries' before does not help. Union (multiple) fails as well. When I change the order in which the union is done, it fails at a different overlay input.
I am using QGIS 3.32.1-Lima on Windows 10 and Python version 3.9.5 (I do the union in a for loop in python script, but it also fails when doing it by hand).
I found this QGIS issue on GitHub: https://github.com/qgis/QGIS/issues/52222. Is there a work around?
Edit
Here are some example shapes: https://baaderkonzept-my.sharepoint.com/:u:/g/personal/jakoby_baaderkonzept_de/EfGc9gWhDhdOshWiEKdcLxwBZ-pa-CBHo_OGDZjcNu24_g?e=NjsmV2
I can union clip2 and clip3, but none of them to clip1. clip1 contains all other unions that have worked before.
Multipart to singlepart and exporting to an new file did not help, the geometry checker only shows valid parts.
Edit 2
I also tried grass v.clean with the default settings for each file I want to union and on the union result before adding the next file. Still, in the long list of unions at a certain point the algorithm fails always with the same error message.