[Qgis-user] How to get a subset of polygons crossed by lines?

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Fri May 1 00:10:47 PDT 2015


Hello,

I have a question related to how the function "intersect" works. I have 
two shapefiles, one of lines the others of polygons. I would like to get 
into a shapefile the polygons that are intersected by the lines. I tried 
unsuccessfully using Vector > Geoprocessing tools > intersect. In this 
case, if the input is the lines and the intersect the polygon, I can 
split the lines according to the border of each polygon, and each 
segment is identified by the polygon name in the attribute, but this is 
not what I want to. If I do the  reverse, I get an empty polygon vector 
file.

What I want is the shapefile of the subset of polygons that intersect 
the lines...

Any idea about how to proceed ?

Patrick

PS: for info, the expected result can be easily obtained in R, package 
'rgeos', function 'gIntersection'



More information about the Qgis-user mailing list