0

I am using ArcGIS 10.2 for Desktop.

The existing polygon database contains attribute table with the following structure, and has three levels; country, state, and city. I am interested in the state of 'Anhui' for example (and many other states not listed below), and I want to create a field indicating states that share boundaries with any of them.

ID_0    country ID_1    state   ID_2    city    ID_state    ID_city
48      China   01      Anhui   08      Hefei   4801        480108
48      China   01      Anhui   08      Hefei   4801        480108
48      China   01      Anhui   15      Tongling4801        480115
48      China   02      Jiangsu 14      Suzhou  4802        480214
48      China   03      Fujian  15      Fuzhou  4803        480315
.
.
0

To do this I would first run the Polygon Neighbors (Analysis) tool, then simultaneously run an arcpy.da.SearchCursor to read the table that results from Polygon Neighbors, and an arcpy.da.UpdateCursor to update a field you add to original polygon feature class with a comma delimited list of adjoining states that you build as you read the neighbors table.

You may need to precede the steps above by using Dissolve on your State field so that you have a polygon feature class of states.

  • Thanks very much. But what do you mean by 'Dissolve,' how to 'Dissolve' on my State field, any tool to apply? – user25458 Mar 4 '14 at 16:37
  • @user25458 I just added a link to Dissolve – PolyGeo Mar 5 '14 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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