Absolute QGIS newbie (3.10.8) here, so please bear with me.

I got a QGIS document where some polygons (countries) are virtually dissolved in regions (like South America), through a rule-based symbology and styled as one polygon with the geometry generator.

buffer (collect($geometry), ' ',(array_contains(array("Reg1" ,"Reg2" , "Reg3"),'Region_name'))),0)

I want to export a file (preferably .shp) of these regional objects into dissolved polygons based on the attribute "region_name" when it occurs in one of the fields "Reg1", "Reg2", "Reg3", some countries being part of several political or economical region (South America as a geographical ensemble where some of the countries belong to a specific economical institution and some other not)

How do I do that?

Edit: Value and field names, explanations

  • Is the actual data separated into individual countries ("Region" field) but the symbology is set to that expression? Or is it a virtual layer? Jan 29, 2021 at 9:02
  • This is a basic shapefile with the countries' border whose symbologie is driven by this expression, not a virtual layer. Some countries will belong to different overlapping regions
    – Per Nett
    Jan 29, 2021 at 10:22

1 Answer 1


There is a very cool tool in QGIS called Geometry by expression. You find it under Menu Processing > Toolbox > Geometry by expression.

It allows you to convert the geometries created with geometry generator (for visualization purpose only) to actual geometries. You can use the same expression as in Geometry generator - see here for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.