If I have a vector of polygons A (say 200) and want to create a new vector (say 120) of the original 200 polygons that are with 500m of a vector of points P (say 50), this is the method I do. I want to know if there is a simpler way
1.) Add calculated field to A called "rownum" with expression $rownum to create an ID field for the polygons
2.) Create buffer vector B of original 200 polygons from A with a 500m radius
3.) Do a spatial query which does
source : B
operator : INTERSECTS
references : P
this will highlight and select 120 records from B. hit close
4.) Right click on B, save as, "save features selected only" is ticked, and save as B2. this now contain just the 120 buffers
5.) Double click A, goto JOIN, and add join to B2 on rownum column added in 1 (seems to do left join still 200 results)
6.) Open attributes for A and add filter by expression "where B2_dummy is not null" (this makes the join effectively an inner join). This will select the 120 rows. close attribute table
7.) Right click A, save as, "save features selected only" is ticked, and save as A2. this now contain just the 120 polygon records from A that were within 500 metres of a point in P
Is there a simpler / better way to do this?