I have a quadratic grid with a different population in each square as the first layer and I have polygons that I made with the ORS Plugin as the second layer.
In my previous question, I got some good help to calculate the population that each polygon covers in each square.
However, I now need to take into consideration that polygons overlap in some squares, and then I need to divide the population in those areas between the polygons. I am fine with assuming that the population is evenly distributed in each square, and I want to divide the population evenly among the polygons that overlap.
Please keep in mind that I may have several polygons overlapping. I also have many polygons, about 4.000, and squares, several millions.
OBS:
"ID"
| The polygons IDs
"Id-2"
| Squares in the grid’s IDs
"POP-2"
| The population in each Square