Help with iterators in model builder

907
4
08-01-2013 10:31 AM
AakashAhamed
New Contributor
Hello all,

I have developed a tool that defines watershed area for a given (x,y) point in model builder. The tool is attached. I want to run this tool for a database of about 500 (x,y) points.

Which iterator function should I use to accomplish this? "Multivariate" seems like what I want, but I cannot get the tool to execute for multiple datapoints. An input of 1 data point works fine.

The top left parameter is an enclosing HUC and the bottom parameter is the point from which the watershed is calculated. I need to perform this function for a series of ~500 points. I am sure there are multiple ways to do this. I tried setting the "reservoir outlet" parameter to "list of values" instead of single value, but this does not accomplish what I need.

Any input appreciated!
0 Kudos
4 Replies
DanielHall_Ballester
New Contributor III
Hi,
assuming I've understood you correctly, you have a geodatabase with a number of point feature classes, and you want to pass each feature class once through your model.  If this is the case, you should use the iterate feature classes tool.
If all your points are in the same feature class, you should use the Iterate Field Value tool instead.  With this tool, you can group by a certain field, (if you have multiple points that need to go through together) or just group by ObjectID (or another unique identifier field) if you want each point to go through on its own.

I hope this helps!
Thanks
Dan
0 Kudos
AakashAhamed
New Contributor
Hi Dan,

Many thanks for your answer. I tried using the iterate feature classes tool. However, the data set that I have is not a geodatabase.

Here is the source info: 
Data Type: File Geodatabase Feature Class
Database: C:\Users\ahameda\Documents\ArcGIS\Aakash Data.gdb
Feature Class: Res_Sed_IFC
Feature Type: Simple
Geometry Type: Point

The GDB that it is saved in has other files as well. This iterator will only let me select geodatabases.

When I try to apply the iterate field value tool, it will not let me connect the iterator's output to the watershed function in model builder.

Should I create a separate gdb with just this file in it? And then use the iterate feature classes tool?

Could batch processing solve this problem? Any further input appreciated. Your comments have been helpful and I am close to solving this problem!

Thanks again,
Aakash
0 Kudos
DanielHall_Ballester
New Contributor III
Hi,
it looks like you have a single feature class for all your points.
Use the Iterate Field values tool and connect the output to the Copy features tool.  Then connect the output from this to your watershed tool.
That should do it 🙂
Thanks
Dan
0 Kudos
AakashAhamed
New Contributor
Dan,

Thanks again. Once again, I am unable to connect the output from Iterate Field Values tool to the Watershed tool. Even if I connect the output to the Copy Features tool and try to connect the output of that to the watershed tool, it only lets me connect as a "precondition" and not the "feature or pour point data" that the watershed tool requires.

I am having limited degrees of success running the tool through batch mode, however. If you have further insights they would be much appreciated. Your responses have helped me strengthen my understanding of model builder and approach a problem from a multitude of different ways.

Best,
Aakash
0 Kudos