I want to assign a value to a field of a polygon layer based on the value of a field on another polygon layer, using a spatial query.

My first polygon layer contains buildings and the second contains administrative boundaries. I want to assign the administrative area code based on which administrative area polygon the building is completly contained in.

So, on my building layer I've a field named "AreaCode" that I want to update with the Area code value from the Administrative Boundaries layer.

I want to do it using the program interface if possible and not by coding a script or macro. Otherwise, does exist an external tool/plugin for ArcGIS that can do this?

2 Answers 2


What you need is a Spatial Join.

There are two types of spatial Join. One is a Geoprocessing tool. Another appears when you right click a Layer in ArcMap and go to Join.

Both are very similar, but there are a few differences in them. You should try both of them out.

  • Yes, I know, but anyway that tools don't update the field on my first layer. They will only make a join between the 2 layers and then you can save it as a new one. Since there are thousands of polygons to process, I'd like to make the whole process smarter and maybe quicker, without creating the new layer and then update it manually deleting the fields that I don't need. Commented Apr 17, 2013 at 9:12
  • AFAIK, this is the only tool in ArcGIS that will do it for you. If you want to update your existing Layer, you'll have to write some custom code, or use a spatial database. Commented Apr 17, 2013 at 9:40
  • did you ever find a solution to this question besides spatial join
    – NULL.Dude
    Commented Jan 5, 2018 at 20:27
  • @Geo.Dude: This is the only GUI tool; You can use some arcpy script too. Commented Jan 12, 2018 at 6:58

No need for coding. You can use model builder for that. create a model that join the two features and then recalculate the field you use. then you can remove the join. let me know if you need any further help.

  • Could you eleborate further on how to answer OPs question, maybe a step-by-step instruction?
    – blabbath
    Commented Aug 6, 2018 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.