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!
Solved! Go to Solution.
The Spatial Join tool should do the trick (Spatial Join—Help | ArcGIS for Desktop ).
Completely slipped my mind- SPATIAL JOIN.
I'll revive this thread should I need more help
The Spatial Join tool should do the trick (Spatial Join—Help | ArcGIS for Desktop ).
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?
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.
Hello. The match options are only available when using the 'select by location' tool, not the sptial join tool.
Thanks for the tips though.
Yes that's correct. The link in the accepted answer refers to that tool.