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.
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.
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.
Step 4: Refresh the Browser Panel
After running the tool, refresh the Browser Panel. You should see your new GeoPackage containing the two layers.
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.
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.
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.
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.
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.