240 likes | 258 Views
Explore the functionalities, setup, and implementation of ModelBuilder to automate analyses, solve common problems, and build various models. Learn the basics, create and save models, and make them generalizable and legible.
E N D
Overview • Why Use ModelBuilder? • ModelBuilder Basics • Common ModelBuilder Problems • Advanced ModelBuilder
Why Use ModelBuilder? • An automation tool… • But comes with some startup overhead • Most useful in two circumstances • Documents models & their parameterization • Allows experimentation with model parameters – particularly for “weighting and rating” • Common Types of Models • ETL – Extract, transform and convert raw data • Suitability – Building attractiveness maps
ModelBuilder Basics • Basic idea is that of a “dependency diagram” • User specifies inputs, processing and outputs • If inputs change, system repeats intermediate operations as needed • Diagram has three kinds of elements • Inputs • Geoprocessing Operations • Outputs • Output from one operation can be used as input to an other, allowing “chaining”
ModelBuilder Setup • Rather obscure to start…implemented as a custom toolbox tool • Open toolbox panel • Create empty toolbox • Right mouse on Toolboxes, select New Toolbox • Create empty model • Right mouse on new Toolbox, select New Model • Then populate model by drag and drop • Of data layers from map table of contents • Of geoprocessing operations from the toolbox • Finally, wire data and processing boxes together
Example: Simple MB Model • Goal • Create a factor map expressing simple proximity to residential landuse where output is classed from 1..9 • Method • Create new model • Add residential landuse • Add Euclidean distance geoprocessing operation • Connect landuse (input) to distance (process), specifying new grid (output) • Run • Add Reclass Operator • Connect output grid of distance operator to input of reclass, specifying new output grid • Run again
Review of Simple Model • Benefits • Multiple logical steps encapsulated in a single step • Model Logic Recorded in Diagram • Model Parameters Recorded • Problems / Caveats • Default is not to show results… • Model as Created is 100% specific to particular data paths/locations on disk • Model Saving Bizarre.. • Default operation names make no sense to end users • Spatial Analyst Toolbar Options do *not* inherit
Showing Results • Simple, but not Obvious • Right Mouse on Output -> Add to Display • If at first you don’t succeed, try toggling again
Saving / Finding Models • By default, models saved in “My Toolboxes” folder • Main menu Tools->Options->My Toolboxes • Default is C:\Documents and Settings\(MIT Username) \Application Data\ESRI\ArcToolbox\My Toolboxes • Easiest to find in ArcCatalog/My Toolboxes • Can “Add Toolbox” stored on disk
Making Models Generalizable • Running Models • Can Double Click on Models in Toolbox Panel • By default, not too useful, because no user control of outputs • Generalizing Models • By default, models only use exact data originally specified • To make a model into a true “tool” need to specify which inputs / outputs are variable parameters • Right mouse on input or output • Select “Parameter” (toggle) • After Parameters are set, double clicking brings up user dialog
Making MB Diagrams Legible • All elements can be “renamed” from right mouse menu • Rename layers if necessary to clarify • Explain intent of geoprocessing operations • i.e. Isolate Residential Landuse instead of reclass1 • If Desired, change diagram properties • Square – Circle – Square • Box Background Colors • If you need better quality, export diagram…
Environment Variables in MB • Note • Spatial Analyst “Options” settings not inheritted • Must explicitly specify for MB • Two options • Can do once for all toolboxes (recommended) • RM Top Toolbox->Environment Settings • General Settings -> Extent • Raster Analysis Settings -> Cell Size • Can do once for each model
Model 2: Weighted Overlay • Goal: • To Create an Attractiveness Model with ability to “Weight” factors • Method: • Create separate ModelBuilder models for each factor • Nest models into master MB model • Combine with weighted overlay
Model 2 Implementation • Factor 1: Proximity to Residential • Factor 2: Proximity to Job Centers • Created by copying and pasting factor 1 model and adjusting inputs and outputs • Weighting • Factor 1 = 2X Factor 2 • Use Spatial Analyst Weighted Overlay tool
Weighted Overlay • Function • Takes any number of uniformly scaled input (factor) grids • Outputs the arithmetically-weighted average value at each grid cell • Equal weights – similar to addition plus rescale
NoData Treatment in Weighted Overlay • Any value averaged with NoData = NoData, • so must code “worst case” as some number • For attractiveness, this would be value “9” • Make sure that areas beyond maximum distance specified in distance operations is recoded to 9
Weighted Overlay “Restricted” Category • Important and useful! • Over-rides averaging behavior if any one factor is “too bad” (as you define it) • Restricted output value can’t be specified = (range) – 1 • In case of 1..9 evaluation, becomes a 0 • Thus requires further reclass to of 0 to 9 in order to maintain 1..9 range
Assignment for Monday 22nd • Implement your attractiveness model in ModelBuilder (revising as needed based on crit) • Build one submodel for each factor • Create one master model combining factors • Models should have elements renamed/formatted for review presentation • Export model diagram as JPEG image for Powerpoint • Resulting revised Powerpoint due to “Attractiveness Team” Monday 22nd 9am (or by negotiation with them)
Midreview Prep Nov 1 & 2nd
Midreview Schedule • Two Morning Sessions • Thursday November 1 • 9 – 9:45 Study Introduction, Visit & Base GIS Overview • 9:45 – 10:15 Accessibility Analysis for Albacete • 10:15 – 10:30 Coffee Break • 10:30 – 12 Presentation of Scenarios • Friday November 2 • 9 – 10:30 Presentation of Attractiveness Models • 10:30 – 10:45 Coffee Break • 10:45 – 11:30 Review of related PhD project work • 11:30 – 12 Summary with Reviewer Comments
Midreview Logistics • All students expected to present one topic • Could be Thurs or Friday • Logistics issue: sensible presentation dictates topic order, but some students can’t stay Thursday must present Friday • Therefore, will need some content swaps • Need one student team to “produce” each module (based on content generated in part by others)
Production/Presentation Teams • Intro / Study Visit / Base GIS Team • Accessibility Team • Scenario Team • Attractiveness Team
Team Assignment for Thursday 25th • Inventory already-produced materials in section • Outline module presentation order and presenters • Assign clean-up and production tasks as needed • Thursday will be “production day” • Review outlines with Stephen & I • Gather materials from others, or schedule handoffs for Friday, etc. • Produce base maps, explanatory introduction to section slides, etc.