QGIS Select-by-Location – How to Select Features Based on Radius Using Specific Distance in QGIS

qgisselect-by-location

I'm a bit of a newbie in coding and geographical systems. At the moment writing my master thesis, so I need some information in terms of distances/neighbouring.

I'm currently working with Swedish data, so I'm using maps using the system: SWEREF 99 TM. I have a vector layer (points) which determine "locations of interest", and another vector (polygon) which divides the same map into districts. I want to select specific districts that are within a radius of the "location interest", say 1km, 2km, so on.

My problem is:

  • How do I know I'm using the correct distances?
  • Which tool should I use? I know I can select features by radius, but I can't find any option based on a specific radius.
  • Is there also a way to select on the radius, but based on the centroids of the polygons?

Bellow a picture:

enter image description here

Best Answer

Use the Select by expression tool with the polygon layer as input and with this expression.

aggregate(
    'Point layer name', -- name / id of points layer
    'count',
    $id,
    distance(geometry(@parent), $geometry)  < 1000 -- set here de distance you want
)