Need help populating a field based off a polygon

992
6
Jump to solution
10-14-2016 03:11 AM
TheoFaull
Occasional Contributor III

Hi all, I'm in desperate need of some help here (time pressure!)

I have a line shapefile with a blank field. This field needs populating with the ID number of a seperate polygon shapefile it intersects. There are 400 polygons each with their own unique ID number.

How can I get these numbers into the relevant line shapes? Some sort of scripting needed (hope not!)?

Thanks!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
FC_Basson
MVP Regular Contributor

The Spatial Join tool should do the trick (Spatial Join—Help | ArcGIS for Desktop ).  

View solution in original post

6 Replies
TheoFaull
Occasional Contributor III

Completely slipped my mind- SPATIAL JOIN.

I'll revive this thread should I need more help

FC_Basson
MVP Regular Contributor

The Spatial Join tool should do the trick (Spatial Join—Help | ArcGIS for Desktop ).  

TheoFaull
Occasional Contributor III

OK I'm not satisfied

Joining a polygon to a polygon will ONLY work where a polygon fals completely inside the polygon you're joining to it. I want to use intersecting polygons if possible.

Also spatial joining joins every field of the join shapefile. How can I make it join specified fields instead?

0 Kudos
FC_Basson
MVP Regular Contributor

I don't think there is a tool to let you do that directly.  Did you set the Match Option in the tool to use "HAVE_THEIR_CENTER_IN"?  Alternatively, you could convert the polygons to a point feature class, remove the fields you don't want and then run the spatial join with the polygons and points.

0 Kudos
TheoFaull
Occasional Contributor III

Hello. The match options are only available when using the 'select by location' tool, not the sptial join tool.

Thanks for the tips though.

0 Kudos
FC_Basson
MVP Regular Contributor

Yes that's correct.  The link in the accepted answer refers to that tool.

0 Kudos