5

I want to save several layer as one geopackage. That works fine. My problem is, that the layers in the geopackage have a different symbology than they had before. I found a video where you could easily keep the smybology, but in my QGIS version (3.12.3 Bucaresti) it is not possible.

Is there another way to export a layer as a geopackage file and keep the same symbology?

  • Well, how was the symbology kept in the video you found? What have you tried? – Erik Oct 27 at 12:48
  • @Erik In the video there was the option to keep the symbology. In my version of QGis this option is not available. – FreddySorbe Oct 27 at 13:19
  • 2
    Ah, you're talking about that video. The one you saw. On the internet... – Erik Oct 27 at 13:38
  • Ah I see. I described that very unsufficient. – FreddySorbe Oct 27 at 13:40
10

The symbology is not saved at the time of export, it is saved as a default symbology afterwards. To do this go to the Layer Properties of the newly created geopackage layer, set the symbology the way you want it, and at the bottom left click Style > Save as Default > Datasource Database.

Then the next time you add this geopackage layer to QGIS it will have the correct symbology.

NOTE: This won't work if you import it into Arc as symbology is treated differently by different platforms.

| improve this answer | |
  • Thanks for the answer. But that means that I have to redo all my symbology settings? – FreddySorbe Oct 27 at 13:18
  • 1
    Try a copy/paste symbology from the layer to the other in the gpkg. Then you saved the style like TeddyTedTed said. – Leehan Oct 27 at 13:55
  • What @Leehan said, I find myself copy/pasting symbology so much I made them into keyboard shortcuts (CTRL+Shift+C/V), best customisation I ever did! – TeddyTedTed Oct 28 at 9:59
1

The Package Layers algorithm may be your best bet. You can find the documentation for it here: https://docs.qgis.org/3.10/en/docs/user_manual/processing_algs/qgis/database.html#package-layers

enter image description here

Note: This tool works great for vector layers, but not for rasters.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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