I have two layers, one polygon of output areas in the UK and a point layer of retail centers. I want to use select by location to find out how many output areas are within 1 km from a retail center. The select by location tool does not have the precision parameter to enter the 1km distance. Does anyone have any suggestion whether there's a plugin that does this? I've done this on ArcGIS but I want to know how it is processed in QGIS.

  • 1
    You can buffer 1 km, then use buffer in Select by Location. Another processing step though..
    – Bera
    Commented Oct 16, 2020 at 10:41

2 Answers 2


The trick is to use the true distance between the point (in the CRS unit) instead of using a buffer, which is only an approximation.

One way to do the join is by using a virtual layer.

Go to the menu Layer > Add Layer > Add/Edit Virtual Layer... and enter the following query.

If you want to keep polygons without nearby points, replace join with left join

select pg.*, count(*) as count_nearby_rail_centers
FROM myPolygonLayer pg
   JOIN myPointLayer a
      ON ST_Distance(pg.geometry, b.geometry) <= 1000
group by pg.id

If you switch the select tool to mode 'Select Features by Radius' you can enter a search radius.

enter image description here

If you don't want to do this manually, you can make a buffer on the points and do a select by location like @BERA also says.

BTW not sure if this is present in QGIS 3.10.3, but is in 3.14.16.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.