“Creating a style once is fun, creating the same styles over and over is inefficient and boring. QGIS provides tools to manage, re-use and share your styles.”
In this module, we will look at how you can create re-usable styles in QGIS. We will also look at how you can make styles that will automatically be applied whenever a user adds a layer to a project. Once a style has been defined, it can be saved in a collection and given a name. That collection can be exported as a file which can be shared with other people.
Tujuan Save styles to your style manager and exchange them with someone else.
Data: ne_10m_admin_0_countries from style-sharing/ne.sqlite and style-sharing/ne_10m_rivers_lake_centerlines.geojson
Check your results:
Use the table to compare behaviours between layer styles and the style library.
|Layer Style||Style Library|
|Other (note below)|
When styling layers, by default your styling work is saved only in the. QGS project file. You can permanently associate a style with a layer by using the 'save as default' option in the layer properties dialogue.
When saving styles that you intend to re-use with other layers, you should take care that the style does not use attributes from the layer that are unlikely to be in other layers (e.g. in expressions). For example, if you create a layer style that relies on an attribute called colour in an expression, that colour attribute should be in any other layer that you subsequently attempt to apply the style to. Take note of the following implementation details:
It should be noted that both layer styles and symbol styles are saved in QGIS' own format which is not interchangeable with other software applications. You can also export your styles as SLD, but the fidelity to the original QGIS layer styling may not be good when using it in other software packages.
What if you want to share a whole collection of styles in your organisation? Check out the new Resource Sharing plugin.
Click here to download the sample data for the lesson.