Friday 25 May 2018

qgis - Saving duplicate geometry layers into a geopackage?


I have a bunch of variables to map with same geometry (Regional Boundaries), and wanted to create separate layers with differing attributes within a single geopackage file for ease of file management. However, when I save the duplicate layer into a geopackage I get an error "Export to vector file failed. Error: Cannot overwrite a OGR layer in place". This seems to be expected behavior according to this bug report. Is there a way around this? Creating separate gpkg files for each layer seems to be unnecessary/superfluous. Or am I misunderstanding the entire concept of geopackage as a an analogue to Esri's geodatabase?



Answer



Thanks to @user30184 for an answer, that prompted me to discover a workflow that works even better for me. Since my original question was nested in need to create multiple thematic layers (primarily based on excel sheets + attribute joins), I discovered that doing a join on a layer and then saving it into the geopackage does not prompt any errors. So instead of duplicating layers and then attaching attributes through table joins, it is easier to do joins first and save files after (as output from the join), then there are no errors and duplicate geometries are saved into a single GPKG.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...