Bug report #19998
Cannot export output of 'Points along geometry' tool as Geopackage
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/OGR | ||
Affected QGIS version: | 3.5(master) | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27820 |
Description
I have a polygon layer which I use as an input to the 'Points along geometry tool'. I produce a temporary layer which contains my points.
Then I go to export this temporary layer as a GeoPackage and get the following error.
Export to vector file failed.
Error: Feature write errors:
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Feature creation error (OGR error: failed to execute insert : UNIQUE constraint failed: temp.fid)
Only 1 of 24 features written.
It might be because the temporary layer has the same value (1) for every feature in the FID field.
Related issues
Associated revisions
Regenerate fids for "points along geometry"
Fix #19998
Regenerate fids for "points along geometry"
Fix #19998
History
#1 Updated by Andrea Giudiceandrea about 6 years ago
#2 Updated by Giovanni Manghi about 6 years ago
- Related to Bug report #19758: Processing: merge vector layers produces duplicated fid added
#3 Updated by Jérôme Guélat about 6 years ago
Yes, it is definitely related... The easiest solution is to delete the fid column in the temporary layer and then save as a GeoPackage. This will recreate a new fid column respecting the UNIQUE constraint.
#4 Updated by Andrea Giudiceandrea about 6 years ago
- Related to Bug report #19708: Processing: Join attributes by location produces duplicated fid added
#5 Updated by Matthias Kuhn about 6 years ago
I think it's better to split this bug report into two separate ones:
1. Rename this one to 'Cannot points along geometry creates duplicate fid' and fix direct export to geopackage
2. Create a new one 'Cannot export layers with a field fid with duplicate ids to GeoPackage'
#6 Updated by Matthias Kuhn about 6 years ago
- Subject changed from Cannot export temporary layer outputted by 'Points along geometry' tool as Geopackage to Cannot export output of 'Points along geometry' tool as Geopackage
- Affected QGIS version changed from 3.2.2 to 3.5(master)
#7 Updated by Matthias Kuhn about 6 years ago
- Status changed from Open to In Progress
#8 Updated by Jürgen Fischer about 6 years ago
- Related to Bug report #20291: Cannot export layer with a field "fid" which is not unique to GeoPackage added
#9 Updated by Anonymous about 6 years ago
- % Done changed from 0 to 100
- Status changed from In Progress to Closed
Applied in changeset qgis|d0eeffbecb01000bd463351bd7845d6dd074a3c0.