Geographic Information Systems Asked on April 1, 2021
In QGIS 3.14.16, I want to outline multiple polygons which share same attribute value.
Styling the layer with the same attribute value bring the following result:
I could use the dissolve function to get the expected result. However, this is not a solution for me, as I need to modify frequently the attribute table.
Is there a way to configure such a style?
My final goal is to style polygons layer with:
Graphically speaking, I want to jump from that style:
to this:
Polygons are colored with category according to field A. They are also outlined with category style according to field B.
EDIT
Here are examples of what I tried so far:
Example 4 (this last example is the best way I found to circumvent that issue, see comments below):
I would suggest using a Virtual Layer in conjunction with st_union()
.
Given a layer of polygons s
with attribute r
, click New Virtual Layer. On the dialog that appears, click Import to bring in the layer s
.
Under Query, enter the following query:
SELECT r,
st_union(geometry)
FROM s
GROUP BY r
The result will appear as a separate layer in the table of contents, but being linked to the same data source, will update as edits are made to the polygons layer. This new virtual layer can be styled separately, such as with a categorized simple outline.
In the image below, a series of squares are symbolized by one attribute, and a virtual layer as described above is overlayed.
When the r
attribute is edited for a selection of features, the virtual layer updates as well.
Correct answer by JoshC on April 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP