Arcgis modelbuilder tutorial

Arcgis modelbuilder tutorial DEFAULT


Data Requirement:
ArcGIS Tutorial Data for Desktop
Learn how to execute tools in ModelBuilder.

This tutorial takes you step-by-step through creating a model and executing tools in ModelBuilder. You start by adding a tool to ModelBuilder and supplying values for the tool's parameters. This constructs a process. A model is built by connecting processes.

This tutorial builds a very simple model that identifies the vegetation types near proposed roads. In the model, the roads are first buffered using values from a distance field in the roads attribute table. The output from the Buffer tool is used to clip the vegetation data to create a dataset of vegetation types within the buffer polygons.

The tutorial is composed of six broad steps:

  1. Copy tutorial data
  2. Open the map document
  3. Create a new model
  4. Add tools and data to the model
  5. Fill in the tool parameters
  6. Run the model
  7. Save the model

1—Copying tutorial data

It is assumed that you have installed ArcGIS for Desktop (ArcGIS for Desktop Basic, Standard, or Advanced) before you begin this tutorial. The data required for this tutorial (included on the ArcGIS for Desktop CD) by default is installed in C:\arcgis\ArcTutor. The tutorial scenario is fictitious, and the original data has been adapted for the tutorial.

  1. To avoid corrupting the original data, copy the ModelBuilder folder from C:\arcgis\ArcTutor to the C drive on your computer. If you are copying the data to another drive or location, make sure to use that location for all the steps below.

2—Opening the map document

Browse to the C:\ModelBuilder folder in Windows Explorer and double click the Extract Vegetation.mxd. This will start ArcMap and open the map document, or

  1. Start ArcMap.
  2. On the ArcMap - Getting Started dialog box, click Existing Maps > Browse for more.

    The Open ArcMap Document dialog box appears.

  3. Browse to C:\ModelBuilder folder, select Extract Vegetation.mxd, and click Open.

    This opens the Extract Vegetation.mxd.

3—Creating a new model

  1. Click the ModelBuilder button ModelBuilder on the ArcMap Standard toolbar.

    This opens the ModelBuilder window for editing.

  2. You can also create a new model by right-clicking an existing toolbox and choosing New > Model. This creates a model in the toolbox with a default name and opens the model for editing.

4—Adding tools and data to a model

Now that the model is open for editing, you will add two tools using the Search window:

  1. In ArcMap, click Geoprocessing > Search For Tools.

    This opens a Search window that you can dock anywhere in ArcMap.

    Opening Search window
  2. On the Search window, type Buffer, then click the Search button Search.

    The Buffer tool is listed along with other search items.

  3. Drag the search item Buffer (Analysis) (which represents the Buffer tool found in the Analysis toolbox) onto the ModelBuilder canvas in the white space.
    Adding tools from Search

    This adds the tool and the output data variable to the model. The output variable is connected to the tool by a connector. Both the tool and output data are empty (without color) as none of the tool parameters have been supplied.

  4. Search for and add the Clip tool in the Analysis toolbox in a similar manner. If the two tools overlap, click the Auto Layout button Auto Layout on the ModelBuilder toolbar to arrange the tools.
    Adding the Clip tool
  5. There are two other methods to add tools in a model that are not used in this tutorial, but have been listed to introduce you to them:
    • In the Catalog window, navigate to Toolboxes > System Toolboxes > Analysis Tools > Proximity. You can select Buffer and drag the tool onto the ModelBuilder canvas in the white space.
    • On the ModelBuilder Standard toolbar you can click the Add Data or Tool button Add Data or Tools, and navigate to Toolboxes > System Toolboxes > Analysis Tools > Proximity. Select the Buffer tool and click Add.

5—Filling in tool parameters

Now that the tools are added to the model, you will fill in the tool parameters.

  1. In ModelBuilder, double-click the Buffer tool to open its tool dialog box.
  2. For the Input Features parameter, click the browse button Browse and navigate to the input geodatabase (C:\ModelBuilder\ToolData\Input.gdb).
  3. Choose the PlanA_Roads feature class and click Add.
  4. Once you fill in the input features, the Output Feature Class parameter is automatically generated and filled in for you. Replace this autogenerated output name by clicking the Browse button Browse for the Output Feature Class parameter. Navigate to the output geodatabase in the ModelBuilder folder (C:\ModelBuilder\Scratch\Output.gdb), type BufferedFC for the output name, then click Save.
  5. For the Distance parameter, choose the Field option and choose the Distance field from the drop-down list.
  6. Click OK. (You don't need to fill in any other parameters.)
    Filling in Buffer tool parameters

    The input data is added as a variable to the model (the blue oval in the above illustration) and is automatically connected to the Buffer. The input variable (the blue oval), the tool (the yellow rectangle), and the output variable (the green oval) change colors to indicate that all parameter values have been supplied and the tool is ready to run. Note that clicking OK on the tool dialog box does not execute the tool in ModelBuilder.

    When data or tools are added to a model, they are referred to as model elements. There are three basic types of elements: variables (such as datasets), tools, and connectors.

  7. Now double-click Clip to open its tool dialog box.
  8. For the Input Features parameter, click the Browse button Browse and navigate to the input geodatabase (C:\ModelBuilder\ToolData\Input.gdb).
  9. Choose the vegtype feature class and click Add.
  10. For the Clip Feature parameter, click the arrow and choose BufferedFC from the drop down list. The blue recycle symbol Model variable means that BufferedFC is a variable in the model. This variable was created in the model when you added the Buffer tool.
  11. Click the browse button Browse for the Output Feature Class parameter, navigate to the output geodatabase (C:\ModelBuilder\Scratch\Output.gdb), type ClippedFC for the dataset name, then click Save.
  12. Click OK on the Clip tool dialog box.

    The output variable of the Buffer tool is automatically connected (using a connector) as an input to Clip, as illustrated below.

    Filling in Clip tool parameters

6—Running the model

After all the parameters of the tools have been filled in, the model is ready to run.

  1. Before you run the model, select the ClippedFC variable, right-click, then click the Add To Display option. Setting this option ensures that when the model is run from ModelBuilder, the output ClippedFC will be added to the display in ArcMap for quick viewing of the results.
  2. From the ModelBuilder menu, click Model > Run Entire Model.

    The model runs and the output is added to the display. After the model has finished running, both the tools (the yellow rectangles) and output variables (the green ovals) show a drop shadow around them indicating that these tools have been run.

Running the model on different roads

To run the model on different roads (such as PlanB or PlanC feature classes), you have two choices:

  1. Double-click Buffer and navigate to another feature class, or
  2. Drag the data from the Catalog window onto the ModelBuilder canvas to create a new data variable, then connect this variable to Buffer. Follow the steps below to see how this works.
  1. On the ArcMap menu, select Geoprocessing > Geoprocessing Options.
    1. Ensure that the check box next to When connecting elements, display valid parameters when more than one is available is checked.
    2. Click OK.
  2. Navigate to the input geodatabase in the Catalog window.
  3. Choose the PlanB_Roads feature class and drag it onto the ModelBuilder canvas.
  4. Click the Connect button Add Connection, then do the following:
    1. Click the PlanB_Roads variable element.
    2. Click the Buffer tool element. A shortcut menu appears containing the choices of available parameters for the tool.
    3. Choose the Input Features parameter from the list.

    This connects the PlanB_Roads variable to Buffer and automatically disconnects the PlanA_Roads variable that was previously connected to the tool. The model elements lose their drop shadow, signifying that the model has not been run with the new variable you added.

  5. Double-click Buffer and choose the correct distance field from the PlanB_Roads feature class.
  6. Run the model with Model > Run Entire Model.
    The model runs and the output is added to the display. After the model has finished running, both the tools and output variables show a drop shadow around them indicating that these tools have been run. The existing output ClippedFC layer (from the previous run with PlanA_Roads) in the ArcMap table of contents is updated with the results from PlanB_Roads.

7—Saving a model

Saving is the last step for this tutorial. You will use the saved model in the Creating tools with ModelBuilder tutorial.

  1. Click the Save tool Save on the ModelBuilder toolbar and navigate to C:\ModelBuilder.
  2. A model can only be saved in a toolbox. Click the New Toolbox icon New Toolbox on the navigation window.

    A toolbox with a default name is added in the workspace.

  3. Change the name to MyTools.tbx.
    Saving a model
  4. Select MyTools.tbx and click Save to save the model with the default name (Model).

Additional analysis

If you want to do some analysis with the model, you can add the Summary Statistics tool to get a summary table of affected area by vegetation type within the buffer polygons around the proposed roads.

  1. Use PlanA_Roads as input in the Buffer tool for this analysis.
  2. Find the Summary Statistics tool in the Search window.
  3. Drag the tool into the model.
  4. Double-click the Summary Statistics element to open the tool dialog box.
  5. For the Input Table parameter, click the arrow and choose ClippedFC with a blue recycle icon Model Variable next to it from the drop down list. This recycle icon means it is a variable in the model.
  6. For the Output Table parameter, browse to the output geodatabase (C:\ModelBuilder\Scratch\Output.gdb), type AffectedVegetation for the name, then click Save.
  7. For the Statistic Field(s) parameter, choose Shape_Area from the list.
  8. Click the cell next to Shape_Area under Statistic Type and choose SUM from the drop down list.
  9. For the Case field parameter, choose VEG_TYPE from the list.

    The completed Summary Statistics dialog box is illustrated below.

    Using Summary Statistics tool
  10. Click OK.
  11. Confirm that the Add to Display option is checked for ClippedFC by right clicking it.
  12. Right click and check the Add to Display option for the AffectedVegetation variable. This will add the ouput to the display after the model runs.
  13. Run the model.

    The output ClippedFC and the AffectedVagetation table is added to display in the ArcMap table of contents.

  14. Open the table by right-clicking and clicking Open.

    The table shows a summary of area by vegetation type within the buffer polygons that will be affected by the proposed roads for plan A.

Related Topics

Feedback on this topic?

In the previous article in this series, Emmanuel Jolaiya provided an introduction to ArcGIS ModelBuilder. In this article, he will be showing users how to use ArcGIS ModelBuilder to develop a model for for analyzing and manipulating GIS Data.

Not to scare you, but this is going to be a really long tutorial. I hope to start a YouTube channel soon, particularly for long tutorial articles like this. But, in the meantime, enjoy this :)

Practical Demo

In this practical demonstration, I’ll be building a model for masking a study area from imagery and calculating the NDVI for the study area. You might be wondering why I want to do this, well, the simplest answer is because I know I’ll most likely carry out similar analysis in the nearest future, so to optimize time in future projects and avoid opening the raster calculator every time, I’ll be designing this model. Yours can be a different reason but the common thing here is that we are trying as much as possible to optimize our time and energy and avoid carrying out repetitive tasks.

Specifications of software and data used:

In this demonstration I’ll be using the following;

Software: ArcMap 10.7 (don’t worry, all ArcMap versions have ModelBuilder, so you can still follow along : ) )

Data: Landsat 8 OLI/TIRS and a feature class (study_area.shp).

Goal: Mask the study area from the Landsat imagery and calculate NDVI for the study area.

Step 1

I’m assuming you have the software installed as well as the data downloaded. Otherwise, you can check here on how to install ArcMap 10.x and here to download Landsat imagery from the USGS data archive.

If you have all the requirements in place:

1. Launch your ArcMap

2. Create a new map document or open an existing map document.

3. On the menu bar, hover on Geoprocessing, select ModelBuilder from the drop-down menu to open the model builder window. (see below)

Opening the ModelBuilder window

The model builder window will appear.

The model builder window

4. Add the data, (this can be done before step 3 as well)

Adding data to ArcGIS ModelBuilder.

You might be wondering where the model builder is, see it at the bottom left of the data frame.

5. When designing a model, there are two major ways we navigate through the model (personal view): 

a) Sketching/drafting method:

This is a process whereby the workflow for the whole analysis is sketched/drafted before beginning the process. This is very good when designing a very complex model.

b) On-the-fly designing.

This is the direct opposite, it involves making decisions as the model evolves. It’s very good when designing simple models.

We’ll be adopting the second option in this demonstration.

Having known that, we can expand our model builder window or re-open using the method I described above in case it’s closed.

Step 2

1. Add in the needed tools. Since we already defined our goal above (masking and NDVI calculation), this has informed us of the needed tools which are the masking tool and the raster calculator.

Search for tools, ArcGIS.

To access the masking tool, I’ll be using the search for tools window from the Geoprocessing tools in the menu bar (see above)When clicked, a search window will appear by the right (see below).

Use the search window when using "search for tools" in ArcGIS.

When it’s opened: search for Masking tools and Raster Calculator

Scroll down to select the Extract by Mask (Spatial Analyst) tool and drag it into the model builder window. You should have something like in the image below.

Extract by Mask (Spatial Analyst) tool

Repeat the same for the raster calculator by searching for a raster calculator (spatial analyst) and dragging into the Model Builder window. You should have something like the image below.

The model builder has a lot of features that we can take a quick tour here to learn about. For the sake of this demonstration, I’ll be going straight to the matter of the day.

We said our goal is to clip a portion from the imagery and calculate NDVI for that portion, and NDVI calculation requires Band4 and Band5 of Landsat 8 imagery, this can vary depending on your imagery source. That means we would need to add one more masking tool, so we can use it to mask the Band4 and Band5. Let’s drag one more masking tool, following the steps above.

There are overlaps in the tools, right? To change this, click on the icon (check arrow direction) to auto-layout the tools. Take a quick tour of ModelBuilder if you haven’t.

You should have something like this after clicking the icon.

Double click on the tools to fill in the data. Below is the Extract by Mask tool interface.

You should have something like this after you fill in all information (input raster, shapefile to mask, and output raster location).

Color code: Yellow represents the tool, blue represents the input, green represents the output. Now let’s open the raster calculator to calculate the NDVI. I’ll be using the B5mask.tif and the B4 mask.tif for the calculation. This is because that is the name I gave the output of the masking tool.

When you auto-layout using the icon I described above. You should see something like this.

for any errors. Click on the validate all model icon to do this. Before we run the model, If you want the output/final result (NDVI) to appear in your table of content, right-click on NDVI.tif and click ‘Add to Display’.

Now you can run your model. Using the icon beside the validate model icon or go to the menu bar, left-click on the model, and click Run.

While executing the red color shows the current tool it’s executing. This took me only a few seconds to execute, instead of more, If I do had gone the manual way. Now, I have my NDVI ready in the table of content and the display. Cool right? 

This is obviously the tip of the iceberg, I’ll show you how to turn the model we built above into a reusable tool in a future tutorial.   

Woo-Hoo! You made it! Thank you for reading along, If you found this tutorial article useful kindly share with your network. Thank you!


About the Author

Emmanuel Jolaiya is a GIS analyst, data scientist, and GIS development enthusiast with a keen interest in transforming data into insights that aids in making informed decisions. He is a 2020 YouthMappers Research Fellow and  2020 Esri Nigeria, Young Scholar Awardee. He has a passion for data and technology with a focus on building sustainable architecture for interoperability and efficient data use toward building solutions that address the most pressing issues in our world and ultimately making the world a better place for us all. Follow him @jeafreezy

Share this article

Tags ArcGIS ModelBuilder, ArcGIS tutorial, ESRI, GIS tutorial
Enter your email to receive the weekly GIS Lounge newsletter:

Explore More GIS Articles

How to Create Firefly Cartography with QGIS
Making Joy Plots with GIS
Run AI-Mapping in QGIS over high-resolution satellite imagery
  1. Lexus 450hl price
  2. Dios te bendiga grandemente
  3. Amazon prime professional
  4. Smithtown lincoln used cars


ModelBuilder is how you create models and model tools. A model is nothing more than a sequence of tools and data chained together; the output of one tool is fed to the input of another. When you save a model, it becomes a model tool.

You open ModelBuilder by clicking Geoprocessing > ModelBuilderModelBuilder. You add data and tools to the ModelBuilder canvas by dragging them from the Catalog or Search window or by using the Add button Add Data or Tools. There are a variety of ways you can connect data to tools; a common method is to use the Add Connection tool Add Connection.

Once you have connected data to tools, you can execute the model from within ModelBuilder by clicking the Run button Run.

There are two primary uses of ModelBuilder:

  • To immediately execute a tool sequence you've created
  • To create tools that you can use like any other tool—from the tool dialog box, from Python scripts, or in another model

There are two tutorials for ModelBuilder:

The ModelBuilder interface

ModelBuilder has a simple interface with drop-down menus, tools on a toolbar, and shortcut menu options as illustrated below. Shortcut menus are available for the whole model or any individual model element (variable, connector, or tool) with a right-click. The white empty space in a model onto which the tools are dragged and connected to the variables is called the canvas, whereas the appearance and layout of the tools and variables connected together is called the model diagram.

The ModelBuilder window
There are five pull-down menus on the main menu:


Options for running, validating, viewing messages, saving, printing, importing, exporting, and closing the model. You can also use this menu to delete intermediate data and set properties for the model.


Cut, copy, paste, delete, and select model elements.


Add data or a tool, create a variable, create a label, and add Model Only tools and iterators.


Contains an Auto Layout option that applies the settings specified on the Diagram Properties dialog box to your model. It also contains options for zooming in or out. The Custom Zoom option lets you zoom by a custom percentage. The preset zoom levels on the View menu (25%, 50%, 75%, 100%, 200%, and 400%) zoom to fixed percentages of the actual size.


Contains an overview window you can use to display the entire model while you zoom in on a certain part of the model in the display window. Your current location in the model window is marked by a rectangle in the Overview window. When you navigate in the ModelBuilder window, this rectangle moves correspondingly.


Access the ArcGIS for Desktop Help Online system and the About ModelBuilder box.

ModelBuilder has three sets of properties to alter a model:

  1. Model properties—These properties allow you to change model name, label, description, relative path, parameter properties, model environments, help, and iteration.

    Learn more about setting general model properties

    Learn more about changing model parameter order, and changing parameter type

  2. Diagram properties—These properties allow you to change the arrangements of elements on the diagram and overall diagram color and style.

    Learn more about changing model layout

  3. Display properties—These properties allow you to change the look of individual elements and other graphic properties.

    Learn more about changing model and element symbology

Related Topics

Feedback on this topic?
Introduction to ArcGIS Model Builder

Use ModelBuilder

In ArcGIS Pro, you can use geoprocessing tools to perform spatial analysis and manage your GIS data. ModelBuilder is used to create, edit, and manage geoprocessing models that automate those tools. Models are workflows that string together sequences of geoprocessing tools, feeding the output of one tool into another tool as input. ModelBuilder can also be thought of as a visual programming language for building workflows.

To build a geoprocessing model in ModelBuilder, add tools and data to a model, and make connections between them to establish the order of execution.

Open ModelBuilder

  1. On the Analysis tab, in the Geoprocessing group, click ModelBuilder.
    ModelBuilder button

    A new blank model is opened. The model is created in your project's default toolbox. You can resize, dock, or tile the model view in any position, as you would a map.

Learn more about opening ModelBuilder

Add data

Models work with data, with the output of one geoprocessing tool being used as input to another tool. You can start building your model by first adding the data you want to process.

  1. To add data to your model, drag layers from the map Contents and datasets from Project into the model.

    The layers and datasets are added to the model and display as input data variables.

    Add a layer to a model

Learn more about adding data to a model

Add geoprocessing tools

Geoprocessing tools are a fundamental building block of your model. ArcGIS Pro has many geoprocessing tools for accomplishing an extensive number of GIS tasks. Once you know the right tools for the work you are doing, it is straightforward to add those tools to a model.

  1. To add a geoprocessing tool to your model, make sure the model view is active, then start typing to search for a tool. A list of search results will display on the Add Tools To Model dialog box. Double-click a tool to add it to the model. Alternatively, you can drag a geoprocessing tool into the model from the Geoprocessing pane or Catalog pane.

    The tool is added to the model and typically appears as a gray rectangle, indicating the tool is not yet ready to run. In addition to the tool, any output data variables that will be created by the tool also appear in the model diagram.

    Add geoprocessing tools to a model.

Learn more about adding geoprocessing tools to a model

Learn more about the Geoprocessing pane

Connect data and tools

Geoprocessing models allow connecting of data and tools into processes. You must specify which data variables in the model should be processed by which geoprocessing tools.

  1. Connect the data variables you added to the model directly to a tool by drawing a connection between them, then choose the tool parameter to which to connect the variable. You can connect the output of one tool as input to another tool.
    Connect a data variable to a tool.

    A connection line is drawn between the data variable and the tool.

Learn more about connecting data and tools

Change tool parameters

Just as when you run a geoprocessing tool in the Geoprocessing pane, tools in ModelBuilder have required and optional parameters. Required parameters must be specified for the tool to run within your model.

  1. Double-click a geoprocessing tool in the model to open the tool and modify the tool parameters. After specifying all required parameters, click OK. The tool does not run when you click OK; it only saves the tool settings.

    When all of a tool's required parameters have a valid value, the tool element color will change to yellow, indicating the tool is ready to run.

Set model parameters

You can make any variable into a model parameter. Variables that are set as model parameters show as tool parameters when the model is run as a geoprocessing tool, allowing you to specify different data or values for your model to process than what was specified when the model was created.

  1. Right-click any variable in the model and select Parameter to make the variable a model parameter.

    An indicator (P) is displayed above the variable to indicate it is a model parameter, and a check mark appears next to Parameter in the variable context menu.

    Make a variable into a model parameter.

Learn more about model parameters

Run the model

  1. Click Run in the ModelBuilder > Run ribbon tab to run the entire model.

    While the tools in the model are running, a progress window appears to indicate which tool is running and any messages. As a model is running, the actively running tool is highlighted in red.

    Tools and outputs that are run successfully appear with a drop shadow. Any output variables that have been marked Add To Display are added to the last active map.

    Full model has been run.

Learn more about running models

Feedback on this topic?


Modelbuilder tutorial arcgis


Creating a simple Model in ArcMap


Similar news:


374 375 376 377 378