[Qgis-user] How to get a subset of polygons crossed by lines?
Michael Treglia
mtreglia at gmail.com
Fri May 1 07:31:36 PDT 2015
Hi Patrick,
I haven't had experience with using the intersect tool in QGIS, but looks
like a spatial query (with the Spatial Query Plugin) can do what you want -
see a tutorial here, starting around step 22:
http://www.qgistutorials.com/en/docs/performing_spatial_queries.html
(after you get the result, there will be a list of feature IDs that are
selected based on the query, and there will be an icon on the screen to
create a new layer with the selected features)
I just did it with a test dataset and it performed as expected.
Hope that helps
mike
On Fri, May 1, 2015 at 2:10 AM, Patrick Giraudoux <
patrick.giraudoux at univ-fcomte.fr> wrote:
> 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'
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150501/42d24d2a/attachment.html>
More information about the Qgis-user
mailing list