[GIS] Performing double classification for symbols in QGIS

qgissymbology

I am using QGIS version 2.14.1 (Essen). I have symbols that I have classified according to certain value from one of the columns in my shapefile.

Is it possible to do a second classification according to a second column?

Basically, I am using data with road works and the deviations linked to roadworks. My first classification is according to the size of the roadwork and I would like the second one to be according to the type of deviation (for cars, pedestrians, buses, etc).

Best Answer

You can use Data defined override in combination with categorised symbology. With this approach you can do categorised symbology on one attribute and set some other parameter (line style, line width etc.) to change according to other attributes.

example on OSM road data:

  • classified by attribute "type" (line color)

enter image description here

  • change the symbol and choose some parameter, click on Data defined override button and write your formula or condition (in this case "maxspeed" /10). You can also use CASE WHEN condition THEN result ELSE result END etc. For possible parameter values see Description.. in parameter context menu

enter image description here

  • result

enter image description here

Related Question