Lecture

GIS Modeling
GIS Topics and Applications
5 Ms of GIS
• Mapping
• Measurement
• Monitoring
• Modeling
• Management
Geoprocessing
• When we perform geoprocessing tasks on our
data, we are developing the components of a GIS
model.
• We perform geoprocessing every time we:
– Use a tool interactively in ArcMap
– Use tools from ArcToolbox
– Execute commands using the command line
– Connect tools in ModelBuilder
– Use functions in a script (like Python)
Static and Dynamic
• Static modeling is the series of steps required to
achieve some final result.
– Available land for development of a nursery
– Siting of cell towers
• Dynamic modeling is performed in a similar
fashion, but has additional parameters requiring
several iterations of the model.
– Disease outbreak modeling
– Real-time traffic analysis
– Spread of wildfires, heavy rain, etc.
Why Model?
• Developing a model for a GIS analysis allows for
repeat testing of a hypothesis using different
data.
• The model can be coded into a GIS application,
so that the steps are performed automatically.
• Easier reproduction of results.
• Simplification of workflow.
• Informs the computer how to conduct a series of
steps that would be impractical for you to do
manually.
Reproducibility
• In performing an analysis, you must have your
workflow clearly defined.
• This ensures that you are performing the steps in
the correct order using the appropriate tools.
• Missteps are easy, especially when there can be
hours of computer processing between steps.
• The GIS model can be exported as a graphic
flowchart or a modeling data structure.
Workflow Efficiency
• There are many repetitive steps you will take in
your daily workflow.
• Streamlining the process saves you time.
• If you always start working in a File Geodatabase
with specific resolution and projection
information, a model for generating your
specialized GDB can be created.
Human Inefficiency
• You physically cannot perform the steps as fast as
GIS can produce the results.
• Certain steps, such as iteration through a feature
set would be prohibitively time consuming.
– You must perform the same steps 21 times to clip
data to each individual NJ county.
– Rail use analysis: 200+ stations
• Minimize the amount of time spent “babysitting”
GIS to perform complex analyses.
How do we model?
• ArcGIS has a drag-and-drop interface to
ArcToolbox called ModelBuilder allowing you to
develop a flow chart of your GIS workflow.
– This flowchart is then run step by step to perform
your analysis.
• ArcGIS allows for custom scripting that can be
added to ArcToolbox, introducing greater
functionality.
– Custom export scripts, specialized versions of existing
tools, develop tools not available in ArcToolbox.
ModelBuilder
Introduction to ModelBuilder
• Over the past semester, we've performed several
geoprocessing tasks
• We have used geoprocessing tools in sequence
to analyze GIS data
• ArcGIS allows you to link tools together to create
a workflow
Homework Flashbacks
• You have a set of points, that you want to clip to
a county, then find the count of points that fall
within each municipality
• You have a statewide layer you want to clip to a
specific feature, then dissolve
• ModelBuilder will allow you to select features,
perform tasks like clip, spatial join, merge, etc…
Inside ArcToolbox
Inside ArcToolbox
• Models and Scripts are
added to custom
toolboxes you create in
ArcToolbox.
Toolbox
Toolset
Script
Model
Creating a New Toolbox
• Creating your own Toolbox is not just for
organizational purposes. It allows you to share
your models with others.
• If you will be sharing your model and using relative
addresses, you need to plan the folder location of your
New Toolbox carefully.
– Default location for a New Toolbox created inside ArcToolbox
is: C:\Documents and Settings\<user profile>\Application
Data\ESRI\ArcToolbox\My Toolboxes.
• Create a new Toolbox by right clicking in ArcCatalog and
selecting New Toolbox.
How ModelBuilder Works
• Drag layers you want to
participate into the model
• Drag tools you want to
use into the model
• Output layers, tables,
objects shown in green
• Connect the features
using arrows
• Order matters to certain
tools (Clip)
Revisiting Assignment #3
• In this assignment, we selected the
municipalities in Gloucester County
• We then selected the KCS within the Gloucester
County municipalities
• Finally, we performed a spatial join on the two
layers to find a count of KCS within each of the
municipalities
Getting Started
• Let's make a new
Toolbox to store our
models
• Make a new model
inside the Toolbox
• Edit the model
Drag and Drop Interface
Order Matters
Order Matters
1
2
Order Matters
2
1
Final Model
Multiple workflows in one Model
non-floodprone layer
Additional Functionality
• The Model can be
expanded further, with
more data and tools
• The Model can be
exported into a
scripting language,
allowing for greater
modeling capabilities.
Additional Functionality
• Python is the default (and recommended)
scripting language for ModelBuilder
• Cursor-based analysis: For each individual
feature in a layer, perform some analysis
– For each "vacant" polygon, is it surrounded by
environmentally sensitive features?
– Count each feature's vertices, rings
• Internet access: automatically download data,
then analyze
Going Further
• A ModelBuilder Overview
Available on ESRI's support page
• Getting Started Writing Geoprocessing Scripts
Available on ESRI's support page
• Dive Into Python
http://www.diveintopython.org/
• Learning Python, 3rd Edition
http://www.oreilly.com/catalog/9780596513986/