[QGIS-Developer] Ordering Rule Based Symbology
Catania, Luke A ERDC-RDE-GRL-VA CIV
Luke.A.Catania at erdc.dren.mil
Tue Aug 27 11:55:18 PDT 2024
I am using some code I found online to add rule-based symbology to my layer.
https://gis.stackexchange.com/questions/250869/managing-rule-based-renderer-in-pyqgis
I want to put layers of the same category in one vector layer rather than making them separate layers and congesting my layer panel. So as I add the layer to the map canvase, I perform a merge to merge it into the category layer adding data of the same type to its category layer. This is polygon data and each polygon also has one or more buffers associated with it.
When I use the code I found at the ling above my layers are not shown in the order they are added. They are properly ordered in the attribute table of the category layer, so wondering why the rules do not get applied based on that order.
Wondering if there is a sort method or how I can get it to create the rules in an order I prefer. I can go to the properties of the layer and reorder the rules that get created by the code but want to do this in code.
Luke Catania
US Army ERDC-GRL
JCMS Site Planning Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20240827/a7d3b955/attachment.htm>
More information about the QGIS-Developer
mailing list