QGIS Classification – Creating a Dynamic Category Thematic Map

classificationqgisthematic mapvisualisation

I am working in QGIS 3.8.3-Zanzibar on a shapefile with polygons.

I am zoning by selecting the polygons and giving each group a different number (a zone code).

In order to visualize it, I have a Category Thematic map with the zone number, so I can easily see the different groups I am creating.

zoning progress

But, as I keep on making groups (that is, giving other zone codes to the polygons), it is hard to visualize the result unless I manually update the thematic map.

I would like the map to dynamically change its colours as I change the zone numbers. Until now, I have to re-classify the categories of the thematic map, as it only classifies with the existing numbers (zone codes) but the new ones I give out, the all go to the group of "all other…"

categories and "all other..."


Here I am going to show my work routine with sample data, as suggested:

  1. Initial shapefile with polygons. Visualization is simple symbol.

1

  1. Visualization with a Category thematic map depending on the zone number (last column of my table).

2

  1. I select some polygons and change their zone number.

3

  1. The visualization has change according to the new zone number of the polygons.

4

  1. I then change other polygons zone number.

5

  1. The visualization changes again, but with the same colour, because any other zone numbers are classified as “all other”.

6

  1. I would like to have this visualization without having to manually update the categories of the thematic map.

7

I don't know how to upload shapefiles, in order to provide the sample data, but here it is a screenshot of my table (it really only matters the last column).

Table

Best Answer

A workaround would be like this:

  • In Style Panel, type $id for "Value".
  • Click on "Classify" button. This generates separate symbols for each id.
  • Change $id to ZoneID.
  • Now, there is a color for each zone id. I assume that the range of ZoneIDs is the same of the feature ids. You may need to refresh map canvas (F5) to see the result.

enter image description here

Related Question