Sunday 6 January 2019

qgis - "Clip" hole into Shapefile


I want to clip a hole into a shapefile. The underlaying shapefile (greenish) consists of many polygons. The overlaying (red) is only one polygon. first image


When I use the clip tool I get this


second image


or this result (depending on the order of the input shapes for the clip tool).


third image


What I need is basically a hole in the underlaying polygin in the shape of the red polygon. Like on the first images, where there is white underneath the green polygon. What am I doing wrong?



Answer



You need to use the Difference tool. The clip tool acts like a cookie cutter, the product being whatever is under the polygon use to clip with. The difference tool will remove the top layer form the bottom layer. Set your green layer as input layer, and red layer as difference layer and the product will be your green layer with nice big hole in it.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...