1

enter image description here

I have a number of bus stops (green points) and a layer of population data (square polygons) containing information on the number of households.

I want to know how many households are within the 500m buffer of the points.

How do I sum the attribute (number of households) to a new value for each point?

  • Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works. Thanks. – PolyGeo Aug 9 at 8:37
  • It looks like you will need to split your population squares by the buffer outline and then use the relative areas to proportion the population. If so look at the Processing toolbox's overlay tools. If you have 3.8 you could also look at the Overlap analysis tool in the Vector analysis section and Join attributes by location summary tool in vector general. – johns Aug 9 at 12:32
1

Here are a couple of ways to sum up the total value of intersecting polygons.

  • Install the refFunctions plugin, and use the Field Calculator to add a field to the buffer layer with this expression:

    intersecting_geom_sum('population_data_layer','number_of_households')
    
  • Use the Field Calculator to add a field to the buffer layer with this expression:

     aggregate( 'population_data_layer', 'sum', "number_of_households", intersects($geometry,geometry(@parent)))
    

Notes:

  • This method will lead to over-counting, because households in squares that just barely touch the buffer will be counted as though all of them are inside the buffer.
  • You can under-count by using within or within_geom_sum instead of intersects or intersecting_geom_sum.
  • You could split the difference by doing both calculations and taking the average.
  • Or, as johns pointed out in the comments section, you can re-calculate the value based on the proportion of the area of each square that intersects the buffer. This assumes that the households in each square are evenly distributed throughout the square. It's probably a better approximation of reality than the approaches above. See this and related questions for how to calculate proportional area:

0

My solution was the following

  • Join attributes by location (summary)
  • Where the buffers are the input layer and the demographic data the join layer
  • Set on interct
  • Fields to summarise -> the number of households
  • summaries to calculate -> sum

Now the buffers have a new attribute with the total of households.

  • Join attributes by field value can be used afterwards to copy these attributes to the points

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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