3

I have created a uniform (nominally square) gird of polygons using the grid tool. I have a road network layer that consists of lines. What I would like to do is iterate over the grid polygons and clip the road network within each square. I can certainly clip the road network out using a single polygon but I would like to automate the process :-) (160+ polygons in the grid!).

Happy to use QGIS 2.14 or 2.18!

6

You need to use clip tool, from Processing toolbox -> QGIS geoalgorithms -> Vector overlay tools -> Clip, as follows:

enter image description here

Select the roads as input layer and grid as clipping layer, and select the green arrow beside the clipping grid

enter image description here

The output will be clipped roads based on each grid polygon.

enter image description here

enter image description here

  • My version of qgis doesn't have the 'Vector Overlay Tools' option in Processing->Geoprocessing (neither 2.18.3 or 2.14.11). Where do they come from? – Glenn Geers Feb 27 '17 at 0:10
  • Ok. Fixed. Had to remove ~/.qgis2. Menus got messed up when installing new version... – Glenn Geers Feb 27 '17 at 0:40
  • 1
    @GlennGeers - Don't forget to accept this answer by clicking the green-faded tick on the left-hand side of this post :) – Joseph Feb 28 '17 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.