Bug report #19611

Cannot save selected features back to the same GeoPackage

Added by Matt Yoder almost 2 years ago. Updated almost 2 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:Data Provider/OGR
Affected QGIS version:3.2.1 Regression?:No
Operating System:Windows 7, macOS 10.13.6 Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:27438

Description

The "Save Selected Features As" operation fails if the destination layer is in the same GeoPackage as the source layer, even if they have different layer names. The error produced is:

Export to vector file failed.
Error: Cannot overwrite a OGR layer in place
Steps to reproduce:
  1. Add a vector GeoPackage layer to the map.
  2. Select some features.
  3. Right-click the layer, and choose Export -> Save Selected Features As.
  4. Choose the source GeoPackage, and provide a different layer name.
  5. Click OK.

Associated revisions

Revision abc96ce2
Added by Alessandro Pasotti almost 2 years ago

[bugfix] Vector file writer: also check for layername before giving up

while (over)writing gpkg &C from vector file writer

With tests

Fixes #19611 - Cannot save selected features back to the same GeoPackage

History

#1 Updated by Alessandro Pasotti almost 2 years ago

I'm afraid this is an GDAL/OGR issue. But I'll have a closer look.

#2 Updated by Alessandro Pasotti almost 2 years ago

It's a QGIS issue.

#3 Updated by Alessandro Pasotti almost 2 years ago

  • Assignee set to Alessandro Pasotti
  • Pull Request or Patch supplied changed from No to Yes
  • Status changed from Open to In Progress

#4 Updated by Anonymous almost 2 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

#5 Updated by Giovanni Manghi almost 2 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF