1

I have a shapefile with lines and a different shapefile with polygons. I want to identify the id (attribute) of the polygons intersected or overlapped by each line, to then make some additional calculations.

I was thinking about finding the number of intersections but that wouldn't give me the information regarding the polygon id.

I think using the intersect tool from QGIS with the id as selected feature could work, but I can't get it working.

I'm using QGIS 2.18.12

  • Intersect sounds like the tool you want, what error do you get when you try to run it? – Michael Stimson Oct 22 '17 at 22:29
  • The problem was that I was using a similar shapefile, but with different data. My mistake. The answer from @ZrSiO4 was what I needed. – Mrescude Oct 22 '17 at 23:06
2

Create a subset of polygons i.e a new shapefile with the intersect tool with your polygon layer as Input Vector Layer and your lines as intersect layer. Save and add the new shapefile to the layer panel. Then you will not need to select particular ids because all the polygons in the new intersect shapefile will meet the intersect criteria, and those should have the ids you are after.

  • Thanks! Wasn't sure about the output file I needed but this works as I expected. – Mrescude Oct 22 '17 at 23:08

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.