TransWikia.com

ArcGIS Spatial Join match options and merge rules

Geographic Information Systems Asked by Brad Oliver on January 16, 2021

I’m having an issue with analysing data using the Spatial Join tool in ArcMap.
I have two data sets namely:

  1. California Counties
  2. Precinct Voting Data

I want to join these two sets so that I have the total_votes and total_yes_votes per county rather than per precinct.

I have set my Target Feature to "California Counties" and my Join Feature to "Precinct Voting Data" but I am still getting results way below the expected amounts. I suspect that it may be my Match Option which is incorrect (currently set to "INTERSECT") as some Precincts fall across two Counties or it may be that I have specified any Merge Rules as I’m not sure which feature classes I need to set Merge Rules for.

Could anyone advise me on how to move forward with this conundrum?

One Answer

For polygons in polygons I would suggest using either within or have their center in. Within will only select precincts that are within the county. Have their center in works well if you have messy polygon edges that overlap a lot, however, if you have extremely irregular polygons whos centroid may fall outside the polygon boundaries. Just something to keep in mind if there is a ton of crazy elongated weirdly shaped districts.

Here is a link to spatial relationships that may help you understand your options better.

https://pro.arcgis.com/en/pro-app/tool-reference/data-management/select-by-location-graphical-examples.htm

Also you will need to keep the Join Operation as Join_one_to_one as that will join and aggregate for you. To combine your fields you probably need to add a new field. to aggregate your data. Right click your votes field and in the merge rules select sum. This will sum the values of all the precincts that are within your counties.

help doc for the spatial tool: https://desktop.arcgis.com/en/arcmap/10.7/tools/analysis-toolbox/spatial-join.htm

help for the merge portion: https://desktop.arcgis.com/en/arcmap/10.7/analyze/executing-tools/using-the-field-mapping-control.htm

You can also use the Join Data Tool. I find it is generally a little easier to get your desired output, unless of course you need the full control of the spatial join tool. Right click the target features in the table of contents (California Counties) and select joins and relates and select join. The Join data dialog Box will come up. In the What do you want to join to this layer dialog box, choose Join Data from another layer based on location. Theen you can specify what attributes you want summed or if you want one to one, etc. The Join Data dialog tends to filter out all the options that are invalid for your relationship so they may make it easier to digest.

enter image description here

Answered by Ben on January 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP