QGIS – Faster Alternative to Intersection for Retaining Overlapping Features

intersectionqgisqgis-3

I want to keep only the features from my data layer (polygon A) within my area of interest (AOI). If I compare two methods to perform that, the processing time is very different.

  1. Intersection tool

I find the function Vector–> Geoprocessing Tools–>Intersection can be very slow (sys. time. 3981.78 secondes or 660 times longer). It trims each polygon from the data layer (polygon A) by the limits/edges of the second polygon (AOI) and adds the information from the attribute table of the other layer. For my purposes, this is not necessary.

  1. Select by location... method

In contrast, if I used Vector–> Research Tools–>Select by Location..., it can run very quickly (sys. time. 6 sec.) + selecting the layer and exporting only selected features. This method selects the polygons that overlap (or touch, depending on the settings) without cutting out the portions of the polygons that do not intersect.

Is there another tool that will perform the algorithm efficiently with just one step? I don't need to trim the edges of each polygon in the layer I want to cut, just keep those that over within the area of interest (I think that is the difference in processing time, given that that is the difference in the result between the two methods.

Best Answer

Try "extract by location", available in Processing Toolbox under vector selection. This is similar to "select by location", but produces a new layer directly instead of a selection.

Related Question