17

QGIS 2.12 has support for saving a layer on the map in the GeoPackage format and that is great. However, I don't see a way to add another layer to the GPKG file, even though GeoPackage supports multiple layers. Is this functionality that is yet to come in QGIS or is there a way to do it with QGIS 2.12?

underdark
  • 84,148
  • 21
  • 231
  • 413
Jim
  • 343
  • 2
  • 3
  • 7

4 Answers4

30

I'm seeing this years later, but if someone still wonders...

In addition to the "save as" method, with QGIS 3.0, you can click and drag layers inside a GeoPackage within the Browser panel.

b_jugger
  • 103
  • 12
Nat Azodnem
  • 451
  • 4
  • 8
  • 1
    This worked great for me. I had to create several different layers with the same basic Attributes(fields) . I just kept dragging them in from a file and re-naming them. Thanks! – Cary H May 01 '19 at 21:53
  • 1
    thank you, this saved so much time! – sn1ks Mar 24 '20 at 13:08
  • I discovered that (QGIS 3.10) you can create a new GeoPackage layer and specify the GeoPackage file you aleady have, and QGIS will warn you whether you want to "Overwrite" or "Add Layer" to existing file. – Tom Charles Zhang Oct 24 '23 at 11:33
8

You could use DB Manager in Menu >> Databases.

  1. Select the Database (Spatialite/Geopackage)
  2. Import layer
7

Right Click on the layer --> Export --> Save features as, change format to GeoPackage and choose the existing geopackage, change the layer name to what you wish and save.

Enock4seth
  • 127
  • 1
  • 6
1

DB Manager seems to have a bug working with geopackage data and can't be used to add another layer to a geopackage. You can use the 'save as' functionality in versions 2.18.1 and above. See: Add layer to existing geopackage not working in QGIS?.

Colin
  • 787
  • 8
  • 21