• Blog posts

    Bio

    By David Crowther

    QGIS___Difference_Tool__clipping__-_1.png

    Question:

    How do you use the features of one layer to clip an area in another layer using QGIS?

    Answer:

    In this example, we want to create several adjacent Street Service ROUND boundaries.

    These areas need to be snapped to the borough boundary, so instead of drawing the Round area from scratch, we will use an existing feature such as a WARD to clip out part of the borough boundary. By doing this, each time we create a new ROUND area we can use the previous ROUND areas to keep clipping the borough. In this way, we can be assured that the ROUND areas snap to each other, and their boundary also snaps perfectly to the Borough edge!

    Let’s start using the shape of an existing area, such as a WARD…. and then use the drawing tools to reshape the Ward to create the desired ROUND1 boundary.

    QGIS___Difference_Tool__clipping__-_2.png

    So that we can continue to create the remaining ROUND areas and keep the integrity of the borough boundary, we will clip out the first ROUND from the original borough shape. This means we can then use the remaining borough shape to then create the next ROUND areas.
    Firstly, let’s save a copy of the original Borough boundary and create ROUND2.

    QGIS___Difference_Tool__clipping__-_3.png

    The pink area is ROUND2.. and is currently an exact copy of the original borough boundary,… including the area under Round1.

    QGIS___Difference_Tool__clipping__-_4.png

    To clip out the ROUND1 area from the ROUND2 layer, we will use the DIFFERENCE tool. From the bottom left of QGIS, type Difference and choose the top option – Edit Selected Features…. as this will update the ROUND2 layer!

    QGIS___Difference_Tool__clipping__-_5.png

    Note – ensure ROUND2 has its edit mode toggled on first.
    In the Difference tool, choose the Overlay layer to be ROUND1.. and then choose Modify All features.

    QGIS___Difference_Tool__clipping__-_6.png

    Once the Difference tool has been run, the ROUND2 layer will be updated with the shape of ROUND1 clipped from the original borough shape.

    QGIS___Difference_Tool__clipping__-_7.png

    If we make ROUND1 invisible, we can see that ROUND2 is the shape of the original borough with the ROUND1 area removed.

    QGIS___Difference_Tool__clipping__-_8.png

    This update removes the ROUND1 area from ROUND2, which means if we reshape ROUND2 to the desired shape, it will still retain the exact shared boundary with the clipped ROUND1 area and will also keep the shared boundary with the Borough shape.
    Let’s now use the editing tools to continue to reshape the polygon to create the desired ROUND2 area. For example, use the Vertex Tool, to remove existing vertices.

    QGIS___Difference_Tool__clipping__-_9.png

    Note – with the Vertex tool if you hold down the left mouse button and drag you can select and delete multiple vertices to reshape the feature more quickly…

    QGIS___Difference_Tool__clipping__-_10.png

    QGIS___Difference_Tool__clipping__-_11.png

    … using the vertex tool manually to continue to reshape the ROUND2 area as needed.

    QGIS___Difference_Tool__clipping__-_12.png

    Once finished, save the changes and the ROUND2 area has been completed.

    QGIS___Difference_Tool__clipping__-_13.png

    Continue this process, to create all the other ROUND areas, starting with ROUND 3.
    Below we have saved a copy of the original borough layer again and this time created ROUND3.

    QGIS___Difference_Tool__clipping__-_14.png

    Then just the DIFFRENCE tool to update ROUND3… removing the areas (geometry) contained in ROUND1 and ROUND2.

    QGIS___Difference_Tool__clipping__-_15.png

    QGIS___Difference_Tool__clipping__-_16.png

    … which means that ROUND3 now contains the borough boundary, but with the shape of ROUND1 and ROUND2 removed!

    QGIS___Difference_Tool__clipping__-_17.png

    Continuing this process will ensure we create ROUND areas that have shared boundaries with each other and with the borough boundary… to ensure there are no gaps or overlaps, so that no properties are missed or allocated to more than one ROUND.

Comments

0 comments

Please sign in to leave a comment.