I have two shapefiles. One of them is residential area and the other one is a polygon shapefile which has the population field.

Now I want to do Join attribute by location (summary) analysis but in some areas my second shapefile intersects two polygons from the residential areas shapefile and gives the population to both the residential areas.

I thought maybe it is better the residential area with the larger area have the population.

I have no idea how can I do that. How can I do this?

enter image description here

In this picture the purple is residential area and the black grid is my second shapefile which has the population field. As you can see, some of the grid intersects two different residential area.


1 Answer 1


You can use this workflow:

  1. Join attributes by location with Join type = Take attributes of the feature with largest overlap only. With your purple layer as input layer.
  2. Statistics by categories with Field to calculate statistics on the attribute you've joined to the purple polygons, like population. Field with categories should be some unique id on your purple layer

Output will be a geometryless table with a row for each purple polygon with many columns of statistics.

  1. If you want, you can join this back to the start layer with Join attributes by field value to get all attributes you started with, the statistics, and the geometries.

enter image description here

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.