QGIS Styling – Displaying Differently Styled Features from a Single Shapefile

attribute-tablefeaturesqgisstyle

I am using QGIS 3.22.1. I have a single FEMA NRI shapefile layer in my project that contains many 'features' (aka columns in the attribute table). For instance, there are columns for risk of drought, hurricanes, and other natural disasters. I know how to pick off a specific feature and create a style to display it nicely on the map. But, I want to be able to apply different styles to several more of these features and then easily toggle between or even turn them on simultaneously.

In the left side layers panel, I'd like to see something that emulates this:

|_|FEMA Shapefile Layer
    |_| Drought Risk
        -> Categorized Style Classification
    |_| Hurricane Risk
        -> Categorized Style Classification
|_|Other Shapefile Layer(s)

Then I want to be able to be able to select and show Drought Risk, Hurricane Risk, or both on top of each other, hopefully with simple checkbox toggles.

Is the best way to do this to simply duplicate the layer and apply a different style to each of the copies?

Best Answer

Sometimes the simplest answer is the best one, and you already identified it.

Is the best way to do this to simply duplicate the layer and apply a different style to each of the copies?

Import the layer into the map as many times as needed using the same source and theme each layer. A layer should generally only have one function and therefore one theme. Using the same source, will ensure that all the layers will have the most up-to-date information and each thematic layer can be easily toggled.

You can use QGIS' Content Groups organize and allow you to toggle the visibility of all layers.

enter image description here

Related Question