Fundamentals of ModelBuilder
Agenda An Overview of Geoprocessing Framework Introduction to ModelBuilder Basics of ArcToolbox Using ModelBuilder Documenting Models Sharing Models with Others Q & A
Geoprocessing is One of the four critical components of GIS Data Management Spatial Analysis Visualization Dissemination
Why Geoprocessing with ModelBuilder? Supports automated tasks, modeling and analysis. Leverage the full value of data investment and workforce Document and manage workflows Save time and money
Geoprocessing Tools and Framework Tools Performs essential and elemental operations on GIS data Framework The mechanics of 1. Using tools 2. Managing tools 3. Publishing tools 4. Creating new tools 5. Automating workflows 6. Models and scripts
What Exactly is ModelBuilder? User-friendly graphical environment Set up and document your geoprocessing workflow Automate a series of tools Ability to run any tool in the ArcToolbox Including scripts, custom tools and other models Supports GDBs, shapefiles, tables, coverages, rasters, CAD, etc.
ArcToolbox Basics Window has four tabs 1. Favorites tree view of all tools 2. Index alphabetical list of tools 3. Search locates tools by keywords 4. Results helps manage tool results for current session 1 2 3 4
Accessing Tools Tool Dialog Command Line Models Scripts
Accessing ModelBuilder Open ModelBuilder (9.3) Launch ModelBuilder with a single click OR Right-click from ArcToolbox
Navigating the ModelBuilder Window Auto Layout Zoom in Continuous Zoom Zoom Select Run Full Extent Zoom out Pan Navigate Add Connection
Exploring Model Elements Data Variable Value Variable Project Data Derived Data Tool Input Value Derived Value Tools Drag and drop into window Use Add Data button Data Drag and drop into window Drag and drop onto tools Fill in dialog Drag from ArcMap TOC Use Add Data button
Model Elements Continued Elements can be: Copied/pasted Within the same model and into other models Deleted Remaining elements become not ready-to-run Renamed Only changes the label not the name Disconnected From a tool (except Derived/Output data variables)
Model Process and Process States Zoning Frequency Zoning_Freq.dbf A Single Process Tool Derived Data Not Ready-To-Run Input Data Tool Derived Data Ready-To-Run Input Data Tool Derived Data Has-Been-Run
Connecting Data and Processes There are two ways you can connect data elements to tool element 1 Connect Tool 2 Tool Dialog = A variable in the model = A layer in the map To connect tools connect the output of one process to the input of another Customers Thiessen Polygons Identity Customers Identity Frequency Frequency Table
Using the Connect Tool Tip: Turn on the option to display valid parameters Tools menu > Options > Geoprocessing By default, a list of valid parameters appears when connections are made
Model Parameters OutputFolder Create Table P Output Table MyTable Model Parameters will have a P next to them The element name becomes the parameter label on the tool dialog Input Point Feature P Create Thiessen Polygons Output
Running a Model in ModelBuilder 1 2 3 Run Single Process Run All Processes Run Ready-To-Run Processes Tool Derived Data
Running a Model in ArcToolbox Double-click on the model to open the tool dialog If there are no model parameters, just click OK in the dialog If there are model parameters, populate what is required, then click OK to run the model
Model Types A Generic Model is where all data is supplied by the user just like in a system tool P Output Location Output Table P Create Table Intermediate Table P Field Name P Field Type Add Field Output Table P A Case Study Model is where the tool requires specific data OutputFolder Output Table Create Table SimpleTable.dbf Field Name Add Field SimpleTable.dbf (2) Field Type
Making Variables From Tool Parameters ModelBuilder will create a variable for all input datasets Does not include non-dataset inputs, i.e. field names or search radius You decide which tool arguments to expose as variables Any variable can be made a model parameter Right-click on tool, then Make Variable > From Parameter Select variable from list 1 2 3
Intermediate Data Deleted after model is run as a tool Assumption is that intermediate data is of no use after the model has run and was only created to connect to another process. Bridges.shp Select Intermediate Data Create Thiessen Polygons Output Polygons Will NOT be deleted if model is run in ModelBuilder To Delete
Intermediate Data Common mistake leaving your output data as intermediate data Tool executes, then deletes its output! Default at 9.3 all derived data except the last is marked as intermediate Uncheck intermediate Or make the variable a parameter! Bridges.shp Buffer Bridges_Buffer
Environment Settings Very important, but frequently overlooked Think of as global parameters to control location of data and aspects of tool execution Current and scratch workspace Coordinate system Extent 1 Check to override specific environment settings 2 Click Values to set specific values
Environment Settings Environments are Passed down to tools and processes At each level, you can override previous settings 1 Application Settings System wide defaults saved to geoprocessing settings. If model runs within ModelBuilder 2 Tool Settings 3 Model Settings Temporarily overrides application settings. Not saved anywhere. If model runs as a tool Can override passed down settings, saved with model. Model Process Settings Can override passed down settings, saved with model.
Using Models in Other Models Models are tools, so you can: Add a model to a model Call the model from a script Run the model in command line Run in batch mode from ArcToolbox
Model Properties Modify the name, label, description and style sheet Specify relative vs. absolute paths
Model Parameters Add, remove, or change the order of exposed parameters Can make optional parameters required Apply Filters
Model Validation Validation Refreshes the contents of data variables Checks that all inputs are correct Model validation is not automatic Keep in mind Data variables Labels used for datasets may not match Descriptions can become out of date Dataset is moved Fields added/removed Can cause models to go from ready-to-run to not ready-to-run
Repairing Models Re-establish data connections Repair tools by fixing parameter values
Model Appearance Enhance the readability of your model Model diagram properties (layout) Model display properties (colors, fonts, symbols) Use labels to document Use pictures for elements Does not affect execution of model 1 2
Model Symbology Two Style options that control: Color Font Shape
Documenting Models with Labels Free Floating Labels Element Labels Connector Labels
Documenting Models with Pictures Use graphic files to illustrate tool and variable elements
Documenting Models with Help and Metadata View tool help View tool dialog help View metadata in ArcCatalog
Toolbox and Model Documentation Choose Edit Documentation on the tool or model in ArcToolbox Documentation Editor opens Add text, graphics, bullet lists, hyperlinks, etc. For Toolbox For Model For the Tool in a Model Documentation Editor Documentation Model Process
Creating Custom Help You can use the documentation editor to write complete help for your model Or, supply your own compiled help files Link to compile help file (CHM) Set CHM location Set tool help context id Export help to HTML file
Printing a Model Print entire model or portions of model Print on a single page or multiple pages Include page numbering, labels, border
Export Model as a Graphic Specify content, quality and size Formats: *.bmp *.jpg *.emf
Create a Model Report Choose Report on the Model menu Static view of variables, parameters, messages
Saving a Model Save your model to an earlier version if needed Right click the model in ArcToolbox
Geoprocessing Resource Center
Additional Resources and Training ArcGIS Desktop Help (Check Online for Updates!) Live Training Seminars and Virtual Courses Geoprocessing Using ModelBuilder Geoprocessing with ArcGIS Desktop Getting Started with Scripting at ArcGIS 9 Instructor-Led Training ArcGIS Desktop III: GIS Workflows and Analysis Advanced Analysis with ArcGIS Introduction to Geoprocessing Scripts Using Python Writing Advanced Geoprocessing Scripts Using Python Working with ArcGIS Spatial Analyst Introduction to ArcGIS Business Analyst Introduction to ArcGIS Desktop for Mining Geoscience
Resources and Training