Matching regions across two shapefiles

279
5
Jump to solution
05-07-2012 02:16 PM
TatyanaDeryugina1
New Contributor II
I have two shapefiles that I'm working with - one of US counties and one of US climate divisions (which are subsets of US states). I would like to match each county to the climate division that it is located in. The only common variable that the two shapefiles contain is "state".

I'm not sure which tool I should use to achieve this. I know I need to match counties to divisions based on geographic coordinates alone, but I have no idea how to do that. Any suggestions would be appreciated!
0 Kudos
1 Solution

Accepted Solutions
DanLee
by Esri Regular Contributor
Esri Regular Contributor
The inconsistency in boundaries from different data sources may exist, even when the datasets are in the same coordinate system. So, instead of using the county polygons, you can try to use points that represent the polygons:

1. Use Feature To Point tool (Data Management toolbox - Features toolset) with the "Inside" option to get county_points from county_polygons. Each point carrries the county_polygons FID and attributes.
2. Use Spatial Join tool to find INTERSECT matches between county_points and the division_polygons. Now the spatialJoined_county_points have division polygon attributes.
3. Use Join Field to join county_polygons with the spatialJoined_county_points via the county_polygons FID to transfer the division attributes to county_polygons.

View solution in original post

0 Kudos
5 Replies
DanLee
by Esri Regular Contributor
Esri Regular Contributor
You can try Spatial Join tool (Analysis toolbox - Overlay toolset) with the INTERSECT match option.
0 Kudos
TatyanaDeryugina1
New Contributor II
Thank you, Dan! That almost worked. My .shp files seem to be in different spatial coordinates (one is GSC_North_American_1983, the other is GSC_WGS_1984). I tried a few transformations, but there doesn't appear to be an exact one. As a result, some counties get matched to multiple divisions (I allowed, "one-to-many" match) because their borders spill over a tiny bit. I've tried "one-to-one" matching and that seems to work, but I'm not sure how it chooses which division to match to - would it be the one that matches best (that would be ideal)?
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
The inconsistency in boundaries from different data sources may exist, even when the datasets are in the same coordinate system. So, instead of using the county polygons, you can try to use points that represent the polygons:

1. Use Feature To Point tool (Data Management toolbox - Features toolset) with the "Inside" option to get county_points from county_polygons. Each point carrries the county_polygons FID and attributes.
2. Use Spatial Join tool to find INTERSECT matches between county_points and the division_polygons. Now the spatialJoined_county_points have division polygon attributes.
3. Use Join Field to join county_polygons with the spatialJoined_county_points via the county_polygons FID to transfer the division attributes to county_polygons.

View solution in original post

0 Kudos
TatyanaDeryugina1
New Contributor II
That works perfectly, thank you!
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
You are welcome! I am glad it worked for you.
0 Kudos