I have a large feature dataset with thousands of entries. Each entry is represented by a polygon. The most have unique values in all fields but some of them have to be merged based on a identity number in a field (zip code). I want to merge these polygons without losing the other field values. Is there a operation for this in QGIS?
QGIS – Merging Polygons Based on Attribute Values
featuresmergeqgis
Best Answer
You can use
Menu Processing / Toolbox / Aggregate
for this. See the documentation: https://docs.qgis.org/3.16/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#aggregateTo keep all attribute values, you can concatenate them. This works well for string (text) fields. If you have integers, you must convert them to string using
to_string("attribute")
(replaceattribute
with the name of the respective attribute). Don't forget to set the resulting field-type to text and define a field-length long enough to include all values: