2

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

Per Nett
  • 43
  • 3
  • Is the actual data separated into individual countries ("Region" field) but the symbology is set to that expression? Or is it a virtual layer? – TeddyTedTed Jan 29 '21 at 09: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 '21 at 10:22

1 Answers1

5

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.

Babel
  • 71,072
  • 14
  • 78
  • 208