Iteration in Model Builder

1029
2
11-15-2013 04:10 PM
ChrisJenkins
New Contributor
Hi All

I have been trying to create a feature iteration in model builder. I will quickly explain what I am trying to achieve and then how I have built my model. Any help on how to get the iteration to work would be appreciated.

So I have a spatial map with a point feature shape file (imagine a random spread of points across the UK) overlaid by a fishnet (2kmx2km grid). Each grid cell is an independent polygon and is assigned a unique identifier in the attribute table). What I am trying to do is take each polygon in turn, select the points within that cell and then run a nearest neighbour assessment. My end product would be a nearest neighbour ratio result for each polygon.

In model builder I have been able to create a model that works when I select an individual polygon but not when I try and add an iterator tool. So the model currently starts with a feature iteration of the polygon shape file, the output feature is used as an input into a select by location along with the point shape file (designed to select the points within each polygon progressively) and then this output is used to run the nearest neighbour tool. The nearest neighbour report being the final goal.

So as i mentioned the model runs for a selected polygon but no longer works when i try to automate the process and 'iterate'. If anyone has any thoughts and/or advice it would be greatly appreciated. Also if anyone has an idea how I create a process for pulling out and aggregating the NN results that would also be of great (obviously not opening each result and copy it out individually...)

Thanks

Chris
0 Kudos
2 Replies
curtvprice
MVP Esteemed Contributor
We need to know the ArcGIS version, and what you mean by "doesn't work". Is there an error mesage? If you could share your model that may also help the community provide an answer.

Also if anyone has an idea how I create a process for pulling out and aggregating the NN results that would also be of great (obviously not opening each result and copy it out individually...)


Normally you use the model iterator variable (%n%) in the final output filename so when the iteration is done the results are available for further analysis. "Collect values" can be used to gather iterator outputs into a list for further processing.

There's a really helpful tutorial on iterators here:
http://blogs.esri.com/esri/arcgis/2011/07/28/tutorial-on-iterators-in-modelbuilder/
0 Kudos
ChrisJenkins
New Contributor
Hi

Thanks for the response! I am currently working offshore with only partial access to the internet so couldn't access the tutorial. I have attached a screen shot of the model I am attempting to build. I am using ArcGIS version 10.1

Thanks again

Chris
0 Kudos