Presentation is loading. Please wait.

Presentation is loading. Please wait.

ModelBuilder at ArcGIS 9.2 Lyna Wiggins Rutgers University May 2008.

Similar presentations


Presentation on theme: "ModelBuilder at ArcGIS 9.2 Lyna Wiggins Rutgers University May 2008."— Presentation transcript:

1 ModelBuilder at ArcGIS 9.2 Lyna Wiggins Rutgers University May 2008

2 ArcToolbox at ArcGIS 9.2

3 Creating a New Toolbox Create a new Toolbox in ArcCatalog or ArcToolbox. Default location for a New Toolbox created inside ArcToolbox is: –C:\Documents and Settings\ \Application Data\ESRI\ArcToolbox\My Toolboxes. If you will be sharing your model and using relative addresses, you need to plan the folder location of your New Toolbox carefully. Create a new Model by a right click on the new Toolbox.

4 Geoprocessing Tools There are five ways of using geoprocessing tools in ArcGIS: –Run (some of) them in ArcMap –Run them from ArcToolbox –Type them at the command line –Use them in a script environment (like Python) –Use them in ModelBuilder

5 What do we want to do? We might want to use a series of geoprocessing tools in an exploratory analysis. As we explore, we want to visualize our results as we work. We might like to change parameter values and see their impact. ModelBuilder is helpful in this exploratory process. Run processes as you go – you may not even want to save the model.

6 What do we want to do? If you have a complex sequence of processes that you have to do frequently – or with a number of different datasets – you will want to create and save a model. You may want to: –run multiple scenarios – for example, for a build-out analysis, –create custom tools and use them inside your model or by themselves, –share your model with others.

7 ModelBuilder ModelBuilder is now integrated throughout the ArcGIS product lines – any tool in Toolbox can be used to define a process. These include tools from the Extensions. ModelBuilder helps us create, edit, document and distribute models. After you create a model it can be exported as a script (to Python, for example).

8 New Integrated Model Window ModelBuilder –Graphic interface –Elements Inputs (blue ellipses) Outputs (green ellipses) Processes (gold rectangles) –Drag and drop tools (processes) from ArcToolbox Fill in parameter values in dialog boxes

9 Input Input data can be any of the ArcGIS data types: –Coverages –Shapefiles –Geodatabase feature classes –Grids –Other ESRI formats

10 Not ready to run Input data

11 ModelBuilder Window Ready to run Model has run Notice shading

12 Tools in Graphics Interface Some of the tools on the ModelBuilder toolbar are there to help you zoom, pan, and organize your model flow chart Two tools are used frequently: –Arrow tool to select –Linkage tool to connect inputs, processes, outputs

13 Model in ModelBuilder A model in this context is a sequence of processes made up of data and tools. The model flow chart gives us a visual representation of our geoprocessing work flow. We can just drag-and-drop our input data sets from the Table of Contents in ArcMap, and drag- and-drop our tools from ArcToolbox. We can also drag-and-drop scripts (from Python, etc.)

14 Example: ModelBuilder

15 Arranging Your Model Elements Use the Auto Layout and Full Extent tools to help arrange your model diagram as you work.

16 Running a Model We can choose to: –Run a single process –Run all ready-to-run processes –Run the entire model Process boxes temporarily turn red as they execute. We receive status messages with each run.

17 Editing a Model Right-click on a Model in ArcToolbox and go to Edit. The ModelBuilder window opens and we can begin editing.

18 What is a Parameter? In ModelBuilder, our tools often need required or optional values in order to run. These are parameters. For example, the Buffer tool needs a buffer distance in order to run. We can “expose a parameter” to allow user input. To do this we will create a parameter as a variable.

19 Creating a Parameter Variable The first step is to right-click on a tool in your diagram and select “Make Variable,” then “From Parameter.”

20 Creating a Model Parameter We now see a new model element, named “Expression.”

21 Creating a Model Parameter The second step is to right-click on this new model element and select “Model Parameter.” Now we see a P label in our model diagram.

22 Derived Data Data that is output from a process is called “derived data.” If output data from a process is not a final result, it is “intermediate data.” When you right-click on an intermediate output, you will see if it has “Intermediate” checked. Intermediate data is temporary.

23 Intermediate Data Models run from a dialog box or the command line delete intermediate data automatically. Models run from within ModelBuilder write intermediate data to disk. Your end results will also be flagged as Intermediate by default – you may need to change this setting.

24 Iteration You can use the output from a process as an input to another process. You can include iteration by using Lists and Series. You can also instruct a model to iterate until a Boolean or long variable criterion is met.

25 Model Validation In the Model drop down menu in the ModelBuilder window, you have the option to “Validate the Entire Model.” This checks that all of your model parameters are correct and that your input data can be found. Models that need repair (for example, if an input data set was moved from its initial location) will show up in the toolbox with a red X through them.

26 Documentation ModelBuilder includes documentation functions. A good idea with a complex model. May become as important as geospatial metadata.

27 Element Labels You can document each process, data element or connector with a label. These labels stay with their element if the element is moved. They are deleted if the element is deleted. Right-click on an element and select “Create Label.”

28 Documentation Editor You should document your models for yourself and other users. Start editing your model in the ModelBuilder window. Then right-click on tool and select “Edit Documentation.” The information you write about a tool will be integrated into the Help file. Back in ArcToolbox, you add additional documentation. Right-click on your model and go to Edit Documentation. You can access the documentation through the Help Page, the metadata tab in ArcCatalog and the model’s side dialog panel.

29 Distributing Your Model To distribute your model, you will need to set model Properties. These include: –Model name, description, etc. (Note that the model name can not contain any spaces or special characters.) –Relative paths to the toolbox location (pathnames maintained relative to the toolbox) –Preview model parameters –Preview model environment settings

30 Distributing Your Model Save your model as a tool in the Toolbox. Save your model as a.tbx file (stand alone). Save your model in a geodatabase. Make sure your toolbox is read/write to your users, and that related data, scripts, documentation, etc. are shared. And that you set relative paths, so that moving the data doesn’t break the model.

31 Export Your Model You can export your model as a graphic – –.bmp,.jpg,.emf You can export your model to a script. Both are from right-click on the Model in ArcToolbox.


Download ppt "ModelBuilder at ArcGIS 9.2 Lyna Wiggins Rutgers University May 2008."

Similar presentations


Ads by Google