I use ArcMap, where I have two layers:
- Buildings as polygons. Each polygon has a number of people living in it as an attribute.
- Polygons dividing the city into "districts". I drew these "districts" myself, so they sometimes cross buildings (which is fine).
I need to calculate the number of people living in each district. I used a spatial join using the buildings as the source and the districts as the target. I set up a merge rule as "Sum" for the number of people.
When I looked at the outcome layer, the total number of people in this layer are higher then in the total number of people in the initial building layer. I think this is because the number of people in buildings that are crossed by "district" boundaries were calculated twice in the summary.
How I can correctly set up the spatial join so that the number of people in the districts are the same as the number of people in the buildings? Ideally, if the majority of a building area fall into polygon, the people should be count as living in this polygon.