Skip to content

Comments

v.out.ogr: fix append+overwrite mode#3283

Merged
metzm merged 1 commit intoOSGeo:mainfrom
metzm:ogr_export_append_fix
Jan 4, 2024
Merged

v.out.ogr: fix append+overwrite mode#3283
metzm merged 1 commit intoOSGeo:mainfrom
metzm:ogr_export_append_fix

Conversation

@metzm
Copy link
Contributor

@metzm metzm commented Dec 2, 2023

Currently, v.out.ogr deletes an existing OGR output layer in append+overwrite mode in L618ff. This

  • deletion of an existing OGR output layer in append mode can be disastrous if it already contains valuable information and data that should definitively not be deleted
  • causes an error because the layer to be appended has been deleted and can not be found in L709, thus fatal error in L724

In are more complex workflow, overwrite might be set to the whole workflow in order to overwrite previous interim GRASS results of an unsuccessful run. Once the processing finishes successfully, overwriting any previous interim GRASS data, the final result should be appended to an external OGR output layer without deleting this external OGR output layer. If anything went wrong previously, selected records in the external OGR output layer should be deleted, but not the complete external OGR output layer.

@metzm metzm added bug Something isn't working vector Related to vector data processing C Related code is in C backport to 8.3 labels Dec 2, 2023
@metzm metzm added this to the 8.5.0 milestone Dec 2, 2023
@metzm metzm requested a review from wenzeslaus December 2, 2023 19:19
@neteler neteler modified the milestones: 8.5.0, 8.4.0 Dec 8, 2023
@metzm metzm merged commit 5ee6ea4 into OSGeo:main Jan 4, 2024
@metzm metzm deleted the ogr_export_append_fix branch January 4, 2024 20:01
metzm added a commit that referenced this pull request Jan 4, 2024
@neteler neteler modified the milestones: 8.4.0, 8.3.2 Jan 4, 2024
@wenzeslaus wenzeslaus removed their request for review January 5, 2024 01:34
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working C Related code is in C vector Related to vector data processing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants