29

I'm not a GIS professional so I hope I use the correct wording, at least I hope you understand my question.

Let's say there are five polygons in the feature A. In the shapefile there are more features. In feature A two polygons from the five existing are intersecting. I want to merge the two so overlapping lines will be deleted and the result is one polygon.

A possible solution would work like this:

  • I select the feature which 'activate' all five polygons
  • I switch to edit mode
  • I select the points of the two polygons
  • I use function MERGE-SELECTED-POLYGONS

So far I found only functions to merge objects (features?), merge shapefiles, and so on.

Is there a function MERGE-SELECTED-POLYGONS?

0

5 Answers 5

25

There's a couple of ways of going about this but you probably want to dissolve the features (Vector->Geoprocessing Tools->Dissolve). With dissolve you don't need to select anything first as it is all done from the attributes. So, let's say you have a field called 'Type' (for example). Then in your example your polygons would all be type 'A' (and you could have some other polygons of type 'B' which you don't want to join with ones of type 'A'). If you select the 'Type' field (or other appropriate attribute in your case) as the attribute to dissolve on then all features of the same type will join together (internal boundaries will be dropped). This may well result in a multipolygon (a single feature which has more than one part, like an archepelago), which might or might not be acceptable. If it is undesirable then simply split the feature up into its constituent polygons by using Vector->Geometry Tools->Multipart to Singlepart.

The alternative is to buffer your polygons by zero, but this probably will join polygons of different types together where you don't want it to happen, so dissolve (optionally follwed by multipart to single part) is safer.

4
  • Thanks for your answer. I think this is not what I want. As I understand that merges all feature which has the same value of property x into one feature, right? I have already one feature with multiple polygons. I want to merge the intersecting polygons so I have 4 polygons in the end instead of 5.
    – user19746
    Jul 4, 2013 at 11:06
  • 1
    It works as you understand but the intersecting polygons become a single polygon. You can then simply do the multi-part to single-part operation and you then will have you final desired result. Jul 4, 2013 at 13:23
  • 1
    I just made a test file and indeed it work with Dissolve when the intersecting polygons are in different features. It doesn't work when the polygons are in the same feature. I didn't got that point. My real dataset doesn't work because of geometry errors during processing, but that's another thing. Thank you!
    – user19746
    Jul 4, 2013 at 15:41
  • This worked for me. Thanks you very much. Feb 27, 2021 at 12:45
23

Why don't you:

  1. Select the two polygons you want to intesect
  2. Enable Editing
  3. Edit-> Merge Selected Features
  4. Save edits
1
  • This is the answer to merge several polygon in a single file to one polygon. Thanks Sam Jun 22, 2016 at 11:31
1

Takes effing forever, but QGis's dissolve tool does work.

I'm not sure why it takes so damn long, but you can dissolve everything in your layer via the "--Dissolve all--" option. Adding a spatial index or something might help I dunno but this option takes forever running inside of qgis

before:

enter image description here

after (10 minutes later on a very fast mac):

enter image description here

And to answer your question about just wanting to merge selected features, yeah. First select your features, then check the box asking about if you only want to use selected features. Its a pretty standard QGis feature pattern (also included is some annotation on the "--Dissolve all--" option which is what I used):

enter image description here

1
  • Not sure why but my dissolve is not working properly on QGIS, it doesn't leave me with a nice and clean shapefile. How could I get for example just the boundaries/outline of a shapefile? I'm interested no other internal polygons.
    – Geosphere
    May 23, 2015 at 19:50
1

I am trying to do the same as you in QGIS 2.14.1 and I am also having trouble. The native "dissolve" included in QGIS didn't work for me. The way that worked for me was using the GRASS function:

Process --> Toolbox --> (in the sidebar) GRASS --> v.dissolve --> and follow along...

I hope it helps someone.

0

Im using QGIS 3.14. I found the GDAL Dissolve tool to be more feature rich than that standard QGIS Dissolve tool. It allowed me to choose the Dissolve Field, choose the geometry name but also, 'Produce one feature for each geometry....' which essentially performed a SinglePart to MultiPart function.

enter image description here

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.