qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.51k stars 2.99k forks source link

Exporting vector file to the same ESRI file geodatabase (.gdb) fail. #56772

Open Alakalufs opened 7 months ago

Alakalufs commented 7 months ago

What is the bug or the crash?

When using vector data from an ESRI file geodatabase (.gdb) exporting to the same database using Export>Save Features As... then choosing ESRI File Geodatabase as format fail with the following error :

Export to vector file failed. Error: Cannot overwrite a OGR layer in place

This happens when keeping the same layer name and trying to overwrite the file or the layer or by trying to create a copy with a new name. Export to another geodatabase work as expected

Steps to reproduce the issue

  1. Load a vector layer from an ESRI file geodatabase
  2. Right click on it and select Export>Save Features As...
  3. Choose the export format as ESRI File Geodatabase
  4. In the File name field select the same geodatabase from witch the layer came from
  5. Set the Layer name field to a new name or use the same layer name
  6. Click OK and get the save error message

Versions

QGIS version 3.36.0-Maidenhead QGIS code revision 09951dc0 Qt version 5.15.3 Python version 3.9.18 GDAL/OGR version 3.8.4 PROJ version 9.3.1 EPSG Registry database version v10.098 (2023-11-24) GEOS version 3.12.1-CAPI-1.18.1 SQLite version 3.41.1 PDAL version 2.6.0 PostgreSQL client version 16.1 SpatiaLite version 5.1.0 QWT version 6.1.6 QScintilla2 version 2.13.4 OS version Windows 10 Version 2009

Active Python plugins changeDataSource 3.1 clusterpoints 6.1 MemoryLayerSaver 5.0.2 processing_saga_nextgen 1.0.0 ProcessX 1.7.1 qgis-maptiler-plugin 3.2 quick_map_services 0.19.34 SpreadsheetLayers 2.1.2 db_manager 0.1.20 grassprovider 2.12.99 processing 2.12.99

Supported QGIS version

New profile

Additional context

No response

agiudiceandrea commented 7 months ago

@Alakalufs, thanks for reporting. Please specify with which QGIS version the issue didn't occur.

Alakalufs commented 7 months ago

I upgraded from 3.34 where I don't remember this problem occurring.

agiudiceandrea commented 7 months ago

@Alakalufs it seems to me the behaviour of QGIS 3.34 and QGIS 3.36 is the same following the provided list of steps.

https://github.com/qgis/QGIS/assets/16253859/05eea177-2f0a-489a-9bcb-21074adc9744

May you please double check?

Alakalufs commented 7 months ago

I may be wrong when remembering it was working before (I don't save a copy of a layer in the same database that often). Anyway it still seem to be a bug as saving a copy under a different name should work without trying to "overwrite a OGR layer in place". I'll edit the issue to not be anymore about upgrading to 3.36