Skip to main content
Solved

Join and sum points onto polygon grid cells based on attributes in points layer

  • December 12, 2022
  • 3 replies
  • 73 views

albjoh
Contributor
Forum|alt.badge.img+5

I have adress points representing persons and attributes for each point including a categorization into age intervals. I also have a polygon grid to which I want to sum up all persons in each age interval to each grid cell. My output should be the grid polygons with a sum for each age interval, like this:

"grid ID" "age 0_5" "age_6-17"

1 12 56

2 23 109

3 4 13

I've tried several solutions eg. with "point on area overlayer" combined with the "list summer" but havn't been able to make it work. I use the 'generate list on an ouput area' option but my resulting "sum_" from list summer returns only "0" for all rows. Do I miss something with the lists buidling? Or any other ideas how this can be done?

 

Thanks

 

Best answer by albjoh

Solved it. Before the pointOnAreaoverlayer I used an attributecreator for setting up the attribute fieldnames (the age intervalls). Then finished off with aggregator grouped on both Id and an attribute for age intervall. Attributes to sum was set to the overlaps col from pointOnAreaoverlayer.

View original
Did this help you find an answer to your question?

3 replies

Forum|alt.badge.img+2
  • December 12, 2022

@albjoh​ I would try PointOnAreaOverlayer to associate the grid cell to the address only, then use Aggregator - group by the cell id and aggregator has sum options. Or you could also use StatisticsCalculator and also Group By the grid ID.


albjoh
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • December 13, 2022
markatsafe wrote:

@albjoh​ I would try PointOnAreaOverlayer to associate the grid cell to the address only, then use Aggregator - group by the cell id and aggregator has sum options. Or you could also use StatisticsCalculator and also Group By the grid ID.

Thanks @markatsafe (Safer)​ Tried this and it results in a nice total sum of points per grid cell.

 

However it will not take care of the grouping of sums for the age intervals. I have tried setting a Testfilter after the PointOnAreaOverlayer and then Aggregators for each filtered stream (4 age intervals in total) which gives me the sums for each interval. However then I want them all back in one final output dataset showing for each gridcell, the sum of people in each age intervall.

 

Tried merging/joining them all together which only partially works since the fields ("age_0_5", ""age_6_17" etc) do get merged but only contents from one field at the time... At most times there are multiple points in one grid cell and those belong to different age intervals. Any Ideas ?


albjoh
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • Best Answer
  • December 13, 2022

Solved it. Before the pointOnAreaoverlayer I used an attributecreator for setting up the attribute fieldnames (the age intervalls). Then finished off with aggregator grouped on both Id and an attribute for age intervall. Attributes to sum was set to the overlaps col from pointOnAreaoverlayer.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings