5

I have a Spatialite layer with two features, the result of a QuickOSM search. I'd like to merge them into a single feature. Before editing, the layer looks like this:

enter image description here

I can enable editing for the layer, select the features, and use the "Merge Selected Features" tool to merge them, which apparently does the right thing, and results in:

enter image description here

Which is exactly what I want. But when I attempt to save the changes, I get this error:

Could not commit changes to layer name_Camp Greenough

Errors: ERROR: 2 feature(s) not deleted.
  
  Provider errors:
      OGR error deleting feature 1: sqlite3_exec(DELETE FROM 'camp_greenough' WHERE "ogc_fid" = 1) failed: no such table: main.idx_camp_greenough_GEOMETRY
      OGR error deleting feature 2: sqlite3_exec(DELETE FROM 'camp_greenough' WHERE "ogc_fid" = 2) failed: no such table: main.idx_camp_greenough_GEOMETRY

Inspecting the layer file with sqlite3, there is indeed a table named camp_greenough that has a GEOMETRY column. There is no idx_camp_greenough_GEOMETRY index. Why is QGIS expecting one?

1 Answer 1

2

While I hope that someone comes along with an explanation about what was going on, I was able to work around the problem by exporting the layers as a geopackage and adding that instead. With that change I was able both to merge features and save the changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.