1

I have a layer where each feature represents a route, and I want these routes to be automatically categorized based on their unique IDs. In other words, if I have two routes, I should have two categories, and when I add a third route, it should automatically be assigned its own category.

Furthermore, when a route is deleted, its corresponding category should also be removed. Essentially, the number of categories should always correspond to the number of routes/features in the layer. I have managed to categorize these features manually, but this doesn't update automatically when I add or remove features.

I understand that this might involve some sort of scripting, possibly with PyQGIS. How can I achieve this?

Vince
  • 20,017
  • 15
  • 45
  • 64
MartinMap
  • 8,262
  • 7
  • 50
  • 114
  • You might want to look at this answer https://gis.stackexchange.com/questions/445269/update-rule-based-symbology-qgis/445391#445391 – Kasper Jun 10 '23 at 15:58

0 Answers0