Bug report #19758

Processing: merge vector layers produces duplicated fid

Added by Jérôme Guélat about 6 years ago. Updated almost 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Processing/Core
Affected QGIS version:3.2.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27583

Description

Here's how to reproduce the bug:

1. Add the 3 layers from the attached GeoPackage (pol.gpkg)
2. Open the merge vector layers tool in Processing, choose the 3 layers and save to a temporary layer
3. The resulting layer has features with the same fid, and hence can't be saved to a new GeoPackage without manually editing the fid values
4. Alternatively if you save directly to GeoPackage (instead of using a temporary layer), the tool produces a wrong output

A similar bug happens with other tools (see #19708). This fid problem makes Processing almost unusable with GeoPackages.

pol.gpkg - Sample data (152 KB) Jérôme Guélat, 2018-09-03 04:22 PM


Related issues

Related to QGIS Application - Bug report #19998: Cannot export output of 'Points along geometry' tool as G... Closed 2018-10-02
Related to QGIS Application - Bug report #19708: Processing: Join attributes by location produces duplicat... Closed 2018-08-27

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Category changed from Processing/QGIS to Processing/Core

I agree this an annoying consequence of having moved to geopackage outputs by default.

#2 Updated by Jürgen Fischer about 6 years ago

  • Description updated (diff)

#3 Updated by Giovanni Manghi about 6 years ago

  • Related to Bug report #19998: Cannot export output of 'Points along geometry' tool as Geopackage added

#4 Updated by Andrea Giudiceandrea about 6 years ago

  • Related to Bug report #19708: Processing: Join attributes by location produces duplicated fid added

Also available in: Atom PDF