Closed jguelat closed 1 year ago
It seems to me the issue does occur using QGIS 3.30.1, 3.30.0 and QGIS 3.28.5, while it doesn't occur using QGIS 3.28.4 and previous versions.
It seems to me the issue does occur using QGIS 3.30.1, 3.30.0 and QGIS 3.28.5, while it doesn't occur using QGIS 3.28.4 and previous versions.
Hm - are you sure this worked in 3.28.4 ?
Because we had fid issues when merging features in 3.28.4 ... which was fixed by https://github.com/qgis/QGIS/commit/689a55aac91fd30a7abeb41f8f495b67ebdf3dd5
This is getting really annoying - all these issues around the merge tool ... it was broken for me for many versions but works starting from 3.28.5. For you it seems to be the opposite. Very strange!
What is the difference in our setups?
I was only testing adjacent - non overlapping polygons though - maybe that is the difference? Are merges of adjacent, non-overlapping features work ok for you in 3.28.5? I didn't know that the merge tool was supposed to work for overlapping features.
Hm - are you sure this worked in 3.28.4 ?
@andreasneumann, please see:
QGIS 3.28.4
QGIS 3.28.5
What if you take over the fid of one of the existing features?
It seems to me that the primary key retrieval is broken in case you don't select one of the existing pkeys of the objects to be replaced. If you select an existing pkey, then it should work fine - right?
Just trying to help narrowing down the issue.
@agiudiceandrea: thanks a lot for the videos and the additional investigation! I now understand why I didn't notice this problem earlier.
@andreasneumann: thanks for your help! Indeed the merge tool was working fine for us before these changes :grin:. I tried using one of the existing pkeys but the behaviour is a bit strange... It indeed works if I replace the "autogenerate" value by the ID of the first feature (in this example 1), but the problem occurs again when I use the ID of the second feature.
By the way, the same problem also occurs when merging lines.
What is the bug or the crash?
Merging selected features when using data coming from GeoPackages or PostGIS is broken with QGIS 3.28 and 3.30. This is probably also happening for other formats using a unique id field. Moreover it looks like the tool is corrupting the geometry of the "non-merged" features.
This works correctly with QGIS 3.22, hence a regression. This is also working correctly with shapefiles...
Probably related to https://github.com/qgis/QGIS/issues/50518
Steps to reproduce the issue
Versions
QGIS version | 3.28.5-Firenze | QGIS code revision | 50adba36f2 -- | -- | -- | -- Qt version | 5.15.3 Python version | 3.9.5 GDAL/OGR version | 3.6.3 PROJ version | 9.2.0 EPSG Registry database version | v10.082 (2023-02-06) GEOS version | 3.11.2-CAPI-1.17.2 SQLite version | 3.41.1 PDAL version | 2.5.2 PostgreSQL client version | unknown SpatiaLite version | 5.0.1 QWT version | 6.1.6 QScintilla2 version | 2.13.1 OS version | Windows 10 Version 2009 | | | Active Python plugins geometry_paster | 0.2 GroupStats | 2.2.7 kart | 1.0.10 qfieldsync | v4.4.9 qgis_geonode | 1.0.1 qgis_stac | 1.1.1 quick_map_services | 0.19.33 RasterAttributeTable | 1.2 swissgeodownloader | 2.0.1 swiss_locator | 2.0.6 VowaConservation | 1.1 VowaSwisstopoBasemapLV95 | 1.0.7 VowaSynthese | 1.1.12 VowaTmoFilter | 1.0.1 db_manager | 0.1.20 processing | 2.12.99 QGIS version 3.28.5-Firenze QGIS code revision [50adba36f2](https://github.com/qgis/QGIS/commit/50adba36f2) Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.6.3 PROJ version 9.2.0 EPSG Registry database version v10.082 (2023-02-06) GEOS version 3.11.2-CAPI-1.17.2 SQLite version 3.41.1 PDAL version 2.5.2 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009 Active Python plugins geometry_paster 0.2 GroupStats 2.2.7 kart 1.0.10 qfieldsync v4.4.9 qgis_geonode 1.0.1 qgis_stac 1.1.1 quick_map_services 0.19.33 RasterAttributeTable 1.2 swissgeodownloader 2.0.1 swiss_locator 2.0.6 VowaConservation 1.1 VowaSwisstopoBasemapLV95 1.0.7 VowaSynthese 1.1.12 VowaTmoFilter 1.0.1 db_manager 0.1.20 processing 2.12.99 ### Supported QGIS version - [X] I'm running a supported QGIS version according to the roadmap. ### New profile - [X] I tried with a new QGIS profile ### Additional context _No response_