Title: Geography 465
1Geography 465
- Overview
- Geoprocessing in ArcGIS
2Geoprocessing as modeling
MODELING
3Types of Models in GIS (by function)
- Descriptive models database
- Change models before and after
- Impact models what happens
- Explanatory models process influence
- Predictive models what will be like
- Prescriptive models should be like
4Example of Suitability Model
5The core of Geoprocessing
- building data processing chains in GIS
- data -gt operation -gt output
6Geoprocessing Framework in ArcGIS 9.x
- Multiple ways to do geoprocessing in ArcGIS
7Developing Geoprocessing Procedures with Model
Builder
- Why use Model Builder?
- Automates geoprocessing workflow
- Portability
- Extensibility
- Reusability
- Documentation
8Developing Geoprocessing Procedures (models) with
Model Builder
- Identify the components of a model
- Build and test models
- Edit existing models
- Simplify complex models using submodels
- Set up a model to run from its dialog
- model parameterization
- Facilitate conditional processing (branching)
with scripts - Calibrate and validate
9Model Components
- In ModelBuilder, models are represented as flow
charts with distinct symbols for each type of
component - Elements are connected together via connector
lines that serve to create processes as well as
show processing flow
10Model Components (elements)
- Data
- Tool
- Derived data
- Value
- Derived value
11Data Process
- Models typically contain several processes, and
they can be chained together so that the derived
output from one process becomes the input for
another process
12Variables
- Any element in a model that isn't a tool is a
variable (project data, derived data, values,
derived values) - Variables can be thought of as placeholders for
datasets or tool parameters - Variable values can be easily changed, and they
can be shared between processes in a model
13Running a Model in ModelBuilder
- To run a model is to run all of the processes
that compose it. The readiness of a process to
run depends on the state of its elements. - A process can be in one of three states
- not ready to run,
- ready to run, or
- has been run.
14Sources of Simple Errors in Models
- A model's readiness to run can be affected by
various factors. One factor is connectivity. A
tool that is not connected to an input element
will not be ready to run.
In this example, there is no input to the Buffer
tool operation therefore, it is not ready to
run.
15Sources of Simple Errors in Models
Another factor affecting to ability to execute a
process in ModelBuilder is specification.
Although the input data element is ready to run,
the parameters of the Add Field tool have not
been defined therefore, the process as a whole
is not
16Sources of Simple Errors in Models
The third factor affecting the ability to run a
process is data accessibility.
In this example, the elements are connected and
their parameters are fully specified. The problem
is that ModelBuilder cannot find the input data
it needs.
17How to start building a model?
- Identify functional relationships between the
phenomenon and its variables - Identify the initial input variables
- Identify the intermediate input variables.
- Choose appropriate tools for implementing
transformation functions as processes - Combine processes based on cause-effect
relationships
18Parametrizing Geoprocessing Models
- Model variables can serve as model parameters.
There are two purposes for this - first, to be able to run your model from a
dialog, and second, - to be able to incorporate submodels.
19Parametrizing Geoprocessing Models
- Declaring a model variable as a parameter is
called exposing the variable.
Any variable in a model (in other words, datasets
and tool values) may be exposed as a model
parameter.
20Running a model with parameters
- Right-click a data element to make it a
parameter - Input or output data can be parameters
21Setting model properties
- Choose Properties on a models context menu
22Setting model properties General
- Modify the name, label, description, and style
sheet
23Setting model properties Parameters
- Add, remove, or change the order of exposed
parameters
24Setting model properties Environments
- Set values for all environments applied to
entire model
25Models and Submodels
- Using submodels allows you to divide parts of a
larger model into smaller, more manageable
pieces. - Before a submodel can be added to a primary
model, the output variable of the submodel must
be exposed as a model parameter. This will allow
the output variable to be shared between models.
26Models and Submodels
27Turning a Script into a Tool
- Another way of using a submodel in a model is to
- 1) export the submodel into a script,
- 2) turn script into a tool, and
- 3) use a script tool in a model
28Turning a Script into a Tool
- export the submodel into a script
29Script from previous export
30Add a loop wrapper
31Turning a Script into a Tool
- Steps
- 1) expose inputs and the output as model
parameters - 2) export the model into a Python script
- 3) turn the script into a geoprocessing tool
- 4) use the script tool as a submodel in an
extended site suitability model
32Geoprocessing Models as Simulation Tools
- Using a model as a simulation tool requires
exposing the output data set as a model parameter - Dialogs provide a simplified view of a model and
allow the user to easily change parameter values
each time the model is run. - Once these model parameters are set, model users
can simply use the dialog for execution. - Running a model from its dialog allows for easy
testing of alternative scenarios.
33Sequence Control and Conditional Processing in
ModelBuilder
- You can control the sequence of processing in
your model by applying a precondition (the output
data from one tool must exist before the tool can
be executed) - You can build conditional processing (branching)
into your model with Python scripts - Python Exercise time!