I work with QGIS 2.18. I have a polygon shapefile with two atrributes: id (unique for each polygon) and type.
I visualize the shapefile using the "type" attribute, but I would like to add a nested rule or category using the "id". When I try to do that, for each type, all the available ids are added when, what I want is to add only the ids that correspond to the type I am modifying.
For example, if I have
"id" "type" 0 forest 1 road 2 road 3 river 4 forest 5 building 6 river
I would like to have:
- One category for 'forest' with the nested values of "id" 0 and 4
- One category for 'road' with the nested values of "id" 1 and 2
- One category for 'river' with the nested values of "id" 3 and 6
- One category for 'building' with the nested values of "id" 5
For 6 features it is simple, but I have 200 hundreds of them.
The goal is to keep the visualization by type and to be able to hide/show the features that I am interested in.
I know I can use the filter option, but when the filter is active I loose the ability to edit the file. I could also split the file using the "type attribute" but I would like to avoid doing that and to keep everything in one file.
Is there a way to do that?