“When data are in discrete classes, you can assign visual styles for each class ”
Some data naturally lend themselves to being symbolised according to classes. A good example is a land cover dataset where each landcover area represents a specific landcover class. These classes can each be assigned a distinct symbol, making it easy to visualise the data. In QGIS we do this using the Categorized symbol renderer.
Goal: Explore the use of categorised renderers in QGIS.
Check your results
Compare your map to the image at the start of this worksheet - were you able to achieve similar results?
Name | Expectation |
---|---|
Symbol renderer |
Categorized |
Colum |
Zone |
Symbol |
Edit the base symbol to have a solid fill with 50% transparency |
Colour ramp |
Random |
The categorized renderer is useful when you have data that is classified by discrete values. The legend for a categorized layer will show a unique colour or symbol for each class. When you have a large number of classes, a categorized symbology may be challenging for the user of your map to interpret since it can be difficult to distinguish visually between the different classes.
The initial colours assigned to your categories will be defined by the colour ramp you choose. Depending on your choice of ramp, you may find that two or more classes have been assigned the same colour. Each class in the categorized renderer's legend can be edited as a single symbol renderer. This means you can, for example, use colour, line hatchings, SVG markers and so on to differentiate each class clearly.
Before using a categorized renderer, you should review the attribute table of your vector layer and evaluate whether you have a suitable attribute for categorizing. Some good examples of attributes you could use are land cover classes, building types, road types.
Categorized renderers can be used with any vector layer geometry type - points, lines and polygons. The symbology options available will be adjusted accordingly.
The maximum number of classes supported by QGIS in a categorized layer:
Can you use a categorized fill on a raster layer:
Once your categories have been defined, they cannot be changed: