Search code examples
qgis

QGIS - Create a shape layer polygon within the empty space of other shapes


I've got a few shape-layers with some polygons which all join up. I want to create a new shape which is the the hole in the middle of the other layers.

I've tried 'snapping', but it seems to lock to vertex and requires a lot of manual accuracy. Ideally i'd like to select the lines where they join and then 'fill in' the area. Though I don't know how to do this in QGIS.

enter image description here


Solution

  • You could use an algorithmic approach like the following (it assumes a situation as the one in the question, so no other holes and polygons are from different layers):

    1. Merge vector layers to combine your different layers into one layer
    2. Dissolve to combine all your features into one feature with one hole
    3. Delete holes to get a layer with hole in the middle filled
    4. Symmetrical Difference of output of 3. and 2. to get a layer where overlapping areas are removed i.e. only the hole should remain as a new layer