Need help populating a field based off a polygon

680
6
Jump to solution
10-14-2016 03:11 AM
Highlighted
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)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Regular Contributor

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

View solution in original post

6 Replies
Highlighted
Occasional Contributor III

Completely slipped my mind- SPATIAL JOIN.

I'll revive this thread should I need more help

Highlighted
MVP Regular Contributor

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

View solution in original post

Highlighted
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?

Reply
0 Kudos
Highlighted
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.

Reply
0 Kudos
Highlighted
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.

Reply
0 Kudos
Highlighted
MVP Regular Contributor

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

Reply
0 Kudos