halestudio / hale

(Spatial) data harmonisation with hale»studio (formerly HUMBOLDT Alignment Editor)
146 stars 44 forks source link

[BUG]: geopackage writer overwrite functionality is not working when file is in use #1201

Open JohannaOtt opened 4 months ago

JohannaOtt commented 4 months ago

Describe the bug When exporting geopackage from hale»studio to an existing file with the "Overwrite target file if it exists" option enabled, the data is not overwritten but added if the file is in use (for example in QGIS)

To Reproduce Steps to reproduce the behavior:

  1. Export a geopackage from hale»studio
  2. Load the geopackage for example in QGIS
  3. Export the geopackage again from hale»studio to the same file with the "Overwrite target file if it exists" option enabled
  4. Load the file again in QGIS. Every object will be contained twice.

Expected behavior The export functionality should throw an error if it cannot overwrite the existing file instead of adding the data to the file again.

Additional context If the file is not in use, the overwrite functionality is working as expected. In this part of the code, it should be checked if the file can be overwritten, or not. If not, the export function should throw an error.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.