9

As you can see below I have 11 polygons in one shapefile, so in the attribute table there are 11 features.

As they all have the same attribute, is it possible to merge them into one feature in QGIS?

enter image description here

3 Answers 3

12

Check the corresponding geoalgorithm in the Processing Toolbox (Ctrl+Shift+T).

For QGIS 3 : "Promote to multipart"

tool3

For QGIS 2 : "Singleparts to multipart"

tool2

3
  • 2
    As far as I know, the number of the mulitpart features depends on the number of the unique attributes. Dec 18, 2016 at 9:07
  • Yes you are right, I missed this option, my bad. Original misleading comment deleted.
    – Oto Kaláb
    Dec 18, 2016 at 9:21
  • 1
    As of qgis 3.x "singlepart to multipart" is called "collect geometries".
    – sieberts
    Dec 17, 2019 at 10:19
6

If you wnat keep any other features in the layer (besides theese in your example) single, you can select required features and perform Merge Selected Features in editing. This option is in Advanced Digitizing Toolbar, you can activate it in menu View --> Toolbars

3

Another solution is the "Collect geometries" geoalgorithm, can be found under Vector > Geometry Tools > Collect geometries.

Takes a vector layer and collects its geometries into new multipart geometries.

One or more attributes can be specified to collect only geometries belonging to the same class (having the same value for the specified attributes), alternatively all geometries can be collected.

All output geometries will be converted to multi geometries, even those with just a single part. This algorithm does not dissolve overlapping geometries - they will be collected together without modifying the shape of each geometry part.

See the "Promote to multipart" or "Aggregate" algorithms for alternative options.

tool

Input: input

The "Collect geometries" was applied with "test" field as 'Unique ID fields'

Output: result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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