6

QGIS has a tool for creating multipart features in the Geometry Tools section. However, this is applied to a whole layer, which leads to the yellow selection in the image below when used (selecting the pentagon selects the stripes as well). I only want to join the three stripes, though. Right now I'm accomplishing this by saving the parts I want to join as a new layer, executing the tool and merging them back to the source layer. However this is quite tedious and unproductive. Is there a better way?

enter image description here

underdark
  • 84,148
  • 21
  • 231
  • 413
MapEngine
  • 995
  • 1
  • 11
  • 20
  • This works pretty well. Definitely better than my method. – MapEngine Apr 09 '15 at 11:19
  • Glad it helped buddy :). I will post the comment as an answer for the convenience of others. – Joseph Apr 09 '15 at 11:25
  • Note that if you are turning those three yellow shapes into a single multi-part feature, you are creating invalid geometries which may cause you problems further down the line. See discussion at http://gis.stackexchange.com/questions/118845/ – Chris W Apr 09 '15 at 19:51

1 Answers1

4

There is an option (in QGIS 2.6.1 anyway) where you can select a Unique ID Field:

  1. Select your desired features
  2. Access the Field Calculator
  3. Create a new field and check the option to update your selected features
  4. Enter a value and save the edits (this will give the selected features the same value and leaves the value for the non-selected features as NULL)
  5. Select this field when using the Singleparts to Multiparts tool.

Hope this helps!

Joseph
  • 75,746
  • 7
  • 171
  • 282