To explain what I want to do the best is a simple example. I have a layer with point for audio geolocated notes. The attribute "type" can store different values : "problem", "surface", "question", "to_osm" or combination of these values.
Now to do style the layer in QGIS I use a rule for each type :
"type" ILIKE '%problem%'.
This solution work well for me since more than 2 years. It is a DIY patch that take time to do and could be easily broken (rename column). I think that this problem was common on GIS data representation.
Yesterday i have found out that solution to build style direct from data exist. With the Lizmap (a webgis solution based on QGIS server), the form filtering feature you are able to set a separator for a field containing multiple unique values. LINK and extract :
If you have specified a splitter text, for example
,, Lizmap will find the unique values of the separated text values. For example the value of one feature
culture, environmentwill be split into
environmentwith the splitter
environmentin the form input will show this feature.
I am asking is there a better solution to do classification of a field with multiple values based on QGIS styling rules ?
PS : I have tried also other solutions based on data structure modification (i use it sometimes) :
- create a column for each type and fill it with boolean : hard to maintain the styling and edit data
- create relation n to n : hard to make it work and then share it with others
- duplicate features for each types : hard to edit the rest of the data