How can I dissolve a shapefile with polygons and keep the information of the polygons that have the bigger area in QGIS? example: two polygons with the same field values but one of them is bigger than the other --> dissolve into one polygon that contains the attribute values of the bigger polygon.
1 Answer
If the polygons you want to dissolve or merge located inside the bigger polygon , then try to use Eliminate sliver polygons located under Vector → Geoprocessing tools → Eliminate sliver polygons
:
- Select the polygon layer you want dissolve/merge
- Select the Area field from the attribute table (Selection Attribute)
- Use the
<=
to select only the polygons less than the bigger polygons area - Write the threshold area of the bigger polygon
- Select Merge by largest area
- Run the tool
-
Amazing! Never thought of using this tool to merge polygons.– KazuhitoCommented Oct 21, 2018 at 10:49
-
@Kazuhito Thank you very much. This tool works great if the small polygons are located inside the bigger polygon, however, I am not sure for OP's case it will give him the desired results or not. Commented Oct 21, 2018 at 10:53
-
In the selection attribute I cannot see every attribute that my file has. Therefore I cannot select a unique ID. Also, this tool doesn't exist in the 3.2 QGIS Version.– NteloCommented Oct 22, 2018 at 15:29
-
2@Ntelo You should mention that you are using QGIS 3.2 in your question. It is quite different in QGIS 3.2, you need to use Eliminate selected polygons tool, and before running the tool, you need to select the polygon that are less than the largest polygon that you want to keep. Then the eliminate tool should run on the selected polygon. Commented Oct 22, 2018 at 15:36
-
To add on ahmadhanab's answer: here's a detailed explanation gis.stackexchange.com/questions/336131/…– VincéCommented Nov 16, 2021 at 14:45