Tuesday 2 April 2019

QGIS: Categorized styling - by multiple columns


I´ve got some polygons that I want to colourize by multiple columns. Can this be done or will I have to edit the attributes? Some polygons only have data-attributes in 1 one column, where as other have data in both column 1,2 and 3. I´m thinking of the concept like the pie chart function in the diagrams-function in layer properties. In this case I want my polygons splitted in colors by the values in the columns.



Answer



You can define rule-based symbology, which then allows you to create the rules using the usual QGIS expression builder.


In this example, I created just 2 rules, one with one field, the other with two fields. You open the expression builder with .... in the Rule properties window. enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...