I am a fairly new user of QGIS having a question regarding dissolve functionality.
I am working with the NUTS-2 shapefiles provided by EU, which I have imported in QGIS. I have created a new layer with only Denmark and Netherlands as you can see in the picture below.
The corresponding attribute table is the following.
The fields describe the ID and name for each NUTS node, as well as the country code. I have introduced a new attribute field, called Merge_attr.
I have managed to dissolve the polygons with the same attribute value of Merge_attr. However, I would like to dissolve polygons based on the Merge_attr value only when they belong to the same country and potentially only when they are adjacent.
Can we constrain dissolve functionality to only polygons that are adjacent?
This means that the following should not take place (yellow polygons got merged even though not adjacent):