1

I have mapped the population (1km x 1km grid) of my country and I have used travel time to create driving distance polygons (i.e. 15 minutes). I have reprojected all the layers to the same EPSG (3857) but when I try to "Join attributes by location" (Population > Intersect > 15 minutes of driving) it just maps out all the points for the entire country. Not just the points within my 15 min-polygon.

I have managed to get this to work before but can't seem to get it to work now. Any suggestions to what I might be doing wrong?

Map of population and driving distance

Here is an example. I want to "extract" all the dots that intersects with the green polygon. Each dot represents a number of people that varies. It's a catchment area analysis. How many people live within 15 minutes of driving.

2
  • 3
    Hi Cluedoz, Welcome to GIS SE. 1) EPSG:3857 is a bad choice (Mercator projection heavily distorts), 2) what do you mean by "map" ("mapped" the population, it just "maps" out all the points...)? 3) Can be a bit more precise and post a screenshot of what you did, because from your description it's difficult to see what went wrong.
    – Babel
    Commented Jan 14 at 13:15
  • Join attributes by location does not remove features that fail the geometry predicate, they simply receive NULL in the fields that otherwise would join successfully. To show only the points you are interested in you need to apply a (spatial) filter - either with a symbology expression, a filter on the data provider, or by creating a new layer with a tool such as Extract by location.
    – Matt
    Commented Jan 14 at 13:42

2 Answers 2

1

If you only want to visually hide the points outside the polygons, but still keep them, simply click next to Enably symbol layer to data driven override (list) icon ɛ > Edit... and insert this expression: overlay_within ('polygons') and replace polygons with the name of your polygon layer.

All points outside the polygons visually disappear, but are still there in the attribute table.

Screenshot (click to enlarge): above, only points inside a polygon are shown, based on the expression; compare with the image below, same layer, but this time with no data driven override for Enable symbol layer: enter image description here

4
  • Why to make life so complicated, there is "Count points in polygon" :)
    – Taras
    Commented Jan 14 at 17:41
  • I thought OP wants to hide the points outside the polygons? They want to "map out (...) just the points within (...) polygon"
    – Babel
    Commented Jan 14 at 17:43
  • Then it is bad me, you are great :)
    – Taras
    Commented Jan 14 at 17:45
  • You're not... OP's question is unclear. Feel free to add your interpretation as answer.
    – Babel
    Commented Jan 14 at 17:45
0

You are looking for the "Extract by location" tool I think. This is the tool to export rows from a layer if they e.g. overlap with another layer.

You can find that tool in the "Processing toolbox" (activate "Processing"/"Toolbox"), then in the toolbox under "Vector selection".

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.