4

I've merged two polygon layers from OSM (leisure=parks and natural=wood) into one. When I try to save the merged layer into .gpkg it shows a problem in creating a unique ID for a bunch of values from the layer.

Has anyone come across a similar bug?

enter image description here

1

1 Answer 1

7

Use the field calculator to overwrite the existing fid with $id, then save the layer.

Currently some IDs aren't unique, as the error message says, but saving to a geopackage requires them to be unique. Hence you either need to enforce uniqueness, or save to e.g. shapefile.

1
  • 3
    Alternatively in the "Save features as..." , in "Layer options" give a new name for FID field. If that field does not exist, it will be created. Commented Apr 3 at 13:39

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.