Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
podcast
Filter by Categories
ArcGIS Pro
GDAL
GeoJson
Map
Map Tools
Maps
postgis
Python
QGIS
Uncategorized

Saving a QGIS Project to a GeoPackage: A Step-by-Step Guide

Saving a QGIS Project to a GeoPackage: A Step-by-Step Guide

 

Step 1: Open the Package Layers Tool

To begin, open the Package Layers tool from the Processing Toolbox. This tool allows you to package vector layers into a new GeoPackage.

Opening the Package Layers tool in QGIS

Step 2: Select Layers to Package

Choose the layers you want to package. For this example, select the catchment boundary and channels. Ensure the option to save the styles into the GeoPackage is checked by default.

Selecting layers to package

Step 3: Name Your GeoPackage

Next, choose an output name for your GeoPackage file and click Run. This will create your GeoPackage with the selected layers.

Naming the GeoPackage

Step 4: Refresh the Browser Panel

After running the tool, refresh the Browser Panel. You should see your new GeoPackage containing the two layers.

Refreshing the Browser Panel to see new GeoPackage

Step 5: Add More Layers

If you want to add more layers, such as the DEM subset TIFF layer, simply drag the layer into the GeoPackage. Note that styles for raster layers will not be imported.

Adding DEM subset TIFF layer to GeoPackage

Step 6: Add Layers to the Project

After importing, the layers need to be added to the project manually. Select the three layers and drag them to the map canvas.

Dragging layers to the map canvas

Step 7: Clean Up Non-GeoPackage Layers

Remove any non-GeoPackage layers from your project, keeping only the layers you want from the GeoPackage. Rename layers to avoid confusion.

 

Step 8: Duplicate and Style Layers

Duplicate the DEM layer and name the duplicate hillshade. Since the DEM does not have a style, copy the style from the original GeoTiff and paste it onto the new layer.

Duplicating layers and applying styles

Step 9: Finalize Your GeoPackage

Once you have styled your layers, remove any unnecessary ones. You can check if they are your GeoPackage layers by hovering over the files. Finally, save the project to the GeoPackage to consolidate everything into one file.

Saving the project to the GeoPackage

Step 10: Complete the Process

After saving, your project is now stored in one GeoPackage file. This includes all layers, styles, and project settings.

 

 

FAQ

What is a GeoPackage?

A GeoPackage is an open, standards-based format for storing geospatial data, allowing for the storage of vector data, raster data, and associated styles in a single file.

Can I store raster styles in a GeoPackage?

Yes, raster styles can be stored in a GeoPackage. 

How do I open a GeoPackage in QGIS?

You can open a GeoPackage by navigating to the Browser Panel, locating your GeoPackage, and dragging the layers into your map canvas.

 

About the Author
I'm Daniel O'Donohue, the voice and creator behind The MapScaping Podcast ( A podcast for the geospatial community ). With a professional background as a geospatial specialist, I've spent years harnessing the power of spatial to unravel the complexities of our world, one layer at a time.