12. Storing the Data in a GeoPackage

To keep the data together and enable easy distribution, it is good to save the layers as a GeoPackage.

1. In the Processing Toolbox look for the Package Layers tool.

2. In the Package Layers dialogue click the Browse buttonand select all layers. Note that these are only the vector layers.

The Package Layers Dialog

3. Save it as Rur_data.gpkg and click Run and Close when it's done. By default it will also save the styles.

4. We can add the raster layers from the Browser panel. Simply drag the raster layers (in our case dem_subset) to the Rur_data.gpkg. You might need to refresh the Browser panel to see the GeoPackage.

Finally, we can also save the project in the GeoPackage. In that way all data and settings are stored in one file that can be shared with others in a much easier way than separate shapefiles, GeoTIFFs, and styling files.

5. Add the layers from the GeoPackage to the project by dragging them from the Browser panel to the map canvas.

6. Copy the styles from dem_subset and hillshade to their respective layers from the GeoPackage. If you get confused, you can hover your mouse over the layer names to see the paths where they are stored.

7. Remove the layers that are not stored in the GeoPackage and rename the remaining layers to their original names.

Now we can save the project to the Rur_data.gpkg with the correct paths.

8. In the main menu choose Project | Save to | GeoPackage...


9. In the pop-up, browse to the Rur_data.gpkg at Connection and name the Project Rur. Click OK to save the project in the GeoPackage.

The end result should now look like this:

Result of Chapter 4

Watch this video to check the steps of this section: