I'm currently performing an network analysis where I calculated catchment areas for health facilities in a city. These catchment areas are overlapping and I want to clip these catchment areas with an underlying population layer which is devided in multiple polygons to see the individual amount of people living in each catchment area. If i use the 'clip' tool in qGIS, it merges all these catchment areas but that is not what I want(see image). I want to keep the individual catchment areas with their unique ID, clipped with the underlying layer without merging results. I currently doing it manually(by deleting all the catchment areas except for one), but that takes me ages. Is there a faster way?
2 Answers
A simple, easy overlooked button did the trick! I used the 'iterate over this layer' button and it worked perfectly. The only problem now is that the output features don't got the original catchment ID's. So it is very hard to link the newly made catchment areas with the right area. Is there a way that I can keep these ID and add them as a variable in the output features?
-
Thanks for your feedback. Please see my update.
Intersect
will be the tool you need.– KazuhitoApr 19, 2018 at 9:27 -
1Sorry, I was to quick with my response. It works! many thanks again. This was of great value– tVaesApr 19, 2018 at 9:39
-
Please do not apologize, it was conceivable requirement. Glad it worked!– KazuhitoApr 19, 2018 at 9:41
QGIS 2.18.18
In the Processing Toolbox, there is SAGA | Vector polygon tools | Polygon clipping
tool.
After selecting your catchment and population layers, click on on a tiny green Iterate over this layer
button and execute this tool.
It will return Output features
as per input catchment polygon.
Polygons hidden by overlying layer are also intact.
This operation can be very slow if you have many catchment polygons.
QGIS 3.0.1
You can do the same using QGIS | Vector overlay | Clip
.
There is a problem with Iterate
in QGIS 2.18.18 Clip
function, so I chose SAGA Polygon clipping
tool as a workaround.
Update
I understand you need id
field from original Catchment polygons. Then please use Intersection
tool as @johns has commented earlier. If you are using QGIS 2.18 and SAGA tool, it is in Processing Toolbox | SAGA | Vector polygon tools | Intersect
.