1

The goal of my project is to create a table with two fields. The first field showing a county name and the second field listing every county that touches the boarder of the county listed in the first field.

I am attempting to do this in ModelBuilder or Python. In ModelBuilder, I use the Iterate Feature Selection Iterator to select each county in the shapefile. This creates two outputs, Value and Selected Features. I then use the Selected Features output to make my Select by Location. Next, I use the model only tool Get Field Value. The hope is that this will get the field values of the NAME field in my attribute table for all of the selected features. Finally, I am using the Calculate Field tool to add the names of all the boundary counties.

Problems:

  1. The problem with using the Selected Features output is that it isn't actually just selecting a county it is creating a temporary feature layer of just that county. So when attempting to make a select by location there is nothing else to select from.

  2. The problem with using the Get Field Value tool is that is only selected the first field value in the table, rather than selecting all the values in the NAME field.

Does anyone know how I can fix these issues? Is this process even possible in ModelBuilder?

enter image description here

Python Script:

enter image description here

  • does this have to be a model builder or would a python script do? – dklassen Jan 15 '14 at 16:32
  • Python script will work. I have one partly completed but it isn't working either. – bailey Jan 15 '14 at 16:33
2

I have written a response to a similar question using python - the link is here:

How to count the number of shapefiles that touch each polygon?

1

there is also a built-in tool called Polygon Neighbors if you have ArcGIS 10. It "creates a table with statistics based on polygon contiguity (overlaps, coincident edges, or nodes)."

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.