enter image description here

I'm working with two political boundary shapefiles from Brazil. One is a municipality shapefile, and the other is the broader micro region, which contains all the municipalities. I'm trying to aggregate an attribute from the municipal file to the micro region one, with the ultimate objective to get the sum of that attribute for all the municipalities that are contained within a specific micro region.

I've been using the spatial join tool, with "Join-One-to-One" and the attribute having the rule set to "Sum". However, when I cross check the results in the attribute table for the new micro region file (the newly joined output) with the labeled data from the underlying municipality file, it's clear the numbers are incorrect. It seems like "Intersect" is the most sensible option for describing the "Match Option" but I might be mistaken.

Any ideas as to what I might be missing?

In the screenshot, the N1994_FEDE value shows 3, but in the labeled map it is displaying as 2, which is the correct value. The first shows that there are only two values in the micro region; the second shows with annotations that the attribute table of the newly joined file is not displaying the correct sum, only adding the 1 value. Using One-to-One and Contains center within as the criteria. enter image description here

Update below

In the following two screenshots I show what is happening when I try to use the suggestion of @FelixIP, enter image description here

  • Please Edit the question to specify the exact software in use. It's quite possible you're getting duplicates due to tiny overlaps in the boundaries. This can be fixed by using a "Have their center in" relationship.
    – Vince
    Commented Oct 27, 2021 at 20:31
  • Thank you, @Vince
    – David Meek
    Commented Oct 27, 2021 at 22:33
  • Thank you, @Vince; that was a good suggestion re: "Have their center in," as I think there might be issues with slivers and overlapping boundaries. However, the "Have their center in" documentation indicates that "The features in the join features will be matched if a target feature's center falls within them." In this case, the target feature is the "micro region" and the join feature is the "municipality," which contains the attribute that I want to join. Trying this option didn't work, I think because it works with the target feature's center, and not the join feature.
    – David Meek
    Commented Oct 27, 2021 at 22:44
  • 1
    Do you understand meaning of Join-One-to-One? First join small to big and do summary statistics.
    – FelixIP
    Commented Oct 27, 2021 at 23:07
  • 3
    If slivers are your problem then buffer the smaller regions by a negative small amount so that erroneous connections aren't made... small depends on the relative inaccuracy of your data. I would not use spatial join in this case, I prefer union or intersect followed by summary statistics (case field from the big polygon, summary fields from small polygons) as it allows you to review each step of the overlap before calculating the statistics, I know it's a bit more work but in the end you can trust your results. Commented Oct 28, 2021 at 2:13

1 Answer 1


Wow! It seems I didn't know how Join-One-to-One works. This and rule merge behavior in spatial join is something new for me (thank you!). Moreover it works:


enter image description here

Output of spatial join using SUM rule, and HAVE_THEIR_CENTER_IN match option.

enter image description here

Still, I am not going to use it for polygon to polygon summaries, unless I am 200% sure that small ones sit in only one of the biggies. First step to obtain reliable results:

enter image description here

  • Thank you @FelixIP, but this doesn't seem to work in this case; I've updated the original description of the issue w/new screenshots to highlight what I'm seeing when I try this approach
    – David Meek
    Commented Oct 28, 2021 at 16:30

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.