Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback...
-
Upload
victor-dixon -
Category
Documents
-
view
225 -
download
0
Transcript of Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback...
![Page 1: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/1.jpg)
Advance Model Builder Features
![Page 2: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/2.jpg)
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
![Page 3: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/3.jpg)
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.
![Page 4: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/4.jpg)
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.
![Page 5: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/5.jpg)
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%)
![Page 6: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/6.jpg)
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.
![Page 7: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/7.jpg)
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
![Page 8: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/8.jpg)
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.
– While: While works exactly like 'while' in any scripting/programming language, executing "while" a condition is true.
![Page 9: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/9.jpg)
Iteration
– Iterate Feature Selection: Iterate Feature Selection tool iterates over features in a feature class.
– Iterate Row Selection: Iterate Row Selection tool iterates on rows in a table.
– Iterate Field Values: Iterate Field Values tool iterates over each value in a field.
– 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.
![Page 10: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/10.jpg)
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 Files: Iterate Files tool iterates files in a folder. – Iterate Rasters: Iterate Rasters tool iterates over rasters
in a Workspace or a Raster Catalog.– Iterate Tables: Iterate Tables tool iterates over tables in
a workspace.– Iterate Workspaces Iterates over workspaces in a
folder.
![Page 11: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/11.jpg)
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.
![Page 12: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/12.jpg)
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
![Page 13: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/13.jpg)
![Page 14: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/14.jpg)
Buffer around Hospitals
Basic Model
![Page 15: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/15.jpg)
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 .
![Page 16: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/16.jpg)
Buffer around HospitalsDefine the iteration valuesIn the For iterator
Use “Value” as an in-line variable substitution to create a unique output
Hosp_buff%Value%
![Page 17: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/17.jpg)
Buffer around Hospitals
![Page 18: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/18.jpg)
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.
![Page 19: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/19.jpg)
Feedback
Define number of iterations using the For iterator.
![Page 20: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/20.jpg)
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.
![Page 21: Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.](https://reader036.fdocuments.us/reader036/viewer/2022081514/56649dc45503460f94ab707b/html5/thumbnails/21.jpg)
Feedback