Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.

Similar presentations


Presentation on theme: "Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions."— Presentation transcript:

1 Advance Model Builder Features

2 Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions Feature Set and Record Set If-then-else logic In-memory workspace Integration of model, scripts and external programs

3 Using Lists A variable that contains one or more values is called a list variable. It is a property of a variable When an output list variable is created in a model, you can use %i% as in-line variable substitution in the output name. %i% appends the list number at the end of output name.

4 Using Lists The model is now ready to run from within ModelBuilder. The model will execute for each input contained in the Input Feature Class list variable.

5 Using Lists It is my opinion that Lists are best used from multi-step, but “short” processing. Use the %i% to create unique output for each list “input”. %i% starts at zero (%0%)

6 Batch Processing In ArcGIS batch processing means to execute a single tool multiple times with different inputs without your intervention. In ArcCatalog or ArcToolbox, right-click a tool and click Batch. This will open the batch window, where you can set up multiple runs for the tool. When you open the batch window for a tool, one row is automatically added, ready to accept input. The following example uses the Clip tool.

7 Batch Processing Entering parameters: To enter the parameters for an entire row, double-click the row header to open the tool's dialog, as shown below. Alternatively, you can right- click the row header and click Open. Use the dialog to enter one or more of the parameter values. Click OK

8 Iteration Iteration or Looping, is to repeat a process over and over with some degree of automation. There are 12 iteration tools in Model Builder. – For: For iterates over a starting and ending value by a given value. It works exactly like For in any scripting/programming language, executing through a set number of items. For – While: While works exactly like 'while' in any scripting/programming language, executing "while" a condition is true. While

9 Iteration – Iterate Feature Selection: Iterate Feature Selection tool iterates over features in a feature class. Iterate Feature Selection – Iterate Row Selection: Iterate Row Selection tool iterates on rows in a table. Iterate Row Selection – Iterate Field Values: Iterate Field Values tool iterates over each value in a field. Iterate Field Values – Iterate Multivalue: Iterate Multivalue tool takes a user-specified list of inputs (for example, inputs from different locations or a subset from a single location of any single type) and runs the model for each value. Iterate Multivalue

10 Iteration – Iterate Datasets: Iterates over datasets in a Workspace or Feature Dataset. – Iterate Feature Classes: Iterate Feature Classes tool iterates over feature classes in a workspace or feature Dataset. Iterate Feature Classes – Iterate Files: Iterate Files tool iterates files in a folder. Iterate Files – Iterate Rasters: Iterate Rasters tool iterates over rasters in a Workspace or a Raster Catalog. Iterate Rasters – Iterate Tables: Iterate Tables tool iterates over tables in a workspace. Iterate Tables – Iterate Workspaces Iterates over workspaces in a folder. Iterate Workspaces

11 Iteration Only one iterator can be used per model. If an iterator is added to a model, all tools in the model iterate for each value in the iterator. If a model containing an iterator is exported to a Python script, the script will not include the iteration logic. Using an iterator will set a default value of -1 in Iteration Options in Model Properties, which simply means that the model will run for unlimited times or based on the number of inputs in an iterator, and not on a set number.

12 For Iterates over a starting and ending value by a given value. It works exactly like For in any scripting/ programming language, executing through a set number of items. Buffer Example

13

14 Buffer around Hospitals Basic Model

15 Buffer around Hospitals Add the For Iterator Connect the output Value from the For Iterator to the Buffer tool. You most define the Buff input for the Value.

16 Buffer around Hospitals Define the iteration values In the For iterator Use “Value” as an in-line variable substitution to create a unique output Hosp_buff%Value%

17 Buffer around Hospitals

18 Feedback In ModelBuilder, the output of a process can be used as an input to a previous process. This is known as feedback, since an output is fed back to a previous process as input.

19 Feedback Define number of iterations using the For iterator.

20 Feedback A feedback variable can be defined from a variable properties or using the connect tool. %n% can be used to insert a systems variable corresponding to the iteration number.

21 Feedback


Download ppt "Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions."

Similar presentations


Ads by Google