ModelBuilder Quick Start

Source: Internet
Author: User

ModelBuilder Quick Start

by Li Yuanxiang

What is ModelBuilder

ModelBuilder is an application for creating, editing, and managing models. A model is a workflow that concatenates a series of geoprocessing tools, and it takes the output of one of the tools as input to another. ModelBuilder can also be seen as a visual programming language for building workflows.

In addition to helping to construct and execute simple workflows, ModelBuilder provides an advanced way to extend ArcGIS functionality by creating models and sharing them as tools. ModelBuilder can even be used to integrate ArcGIS with other applications.

?

?

Advantages of ModelBuilder

    • ModelBuilder is an easy-to-use application for creating and running workflows that contain a range of tools.
    • You can use ModelBuilder to create your own tools. Tools created using ModelBuilder can be used in Python scripts and other models.
    • Combined with ModelBuilder and scripting, ArcGIS can be integrated with other applications.

The main interface of ModelBuilder is as follows, very concise.

Several important words of modelbuilder

    1. Model elements

There are three main types of model elements: tools, variables, and connectors.

    The
    • tools: geoprocessing tool is a fundamental part of the model workflow. Tools are used to perform a variety of operations on geographic data or tabular data. Once the tool is added to the model, it becomes the model element. The
    • variable: variable is the element in the model that is used to hold values or to reference disk data. There are two types of variables:
      • data: Data variables are model elements that contain descriptive information about disk data. The data properties described in the data variables include field information, spatial references, and paths.
      • Value: A value variable is a value such as a string, numeric, Boolean (true/false value), spatial reference, linear unit, or range. A value variable contains all information except for a reference to the disk data.
    • connector: connector is used to connect data and values to the tool. The connector arrows show the direction in which geoprocessing is performed. There are four types of connectors:
      • data: data connectors are used to connect data variables and value variables to the tool. The
      • Environment: environment Connector is used to connect variables (data or values) that contain environment settings to the tool. The tool will use this environment setting when it executes.
      • Prerequisites: A precondition connector is used to connect a variable to a tool. The tool executes only after the content of the precondition variable has been created.
      • Feedback: feedback connectors are used to return the output of a tool as input to the same tool.
    1. Process Model

      The model flow consists of a tool and all the variables that are connected to the tool. Connector lines are used to indicate the order of processing. Multiple processes can be connected together to create a more complex process.

    2. Intermediate data

      When you run the model, each process in the model creates output data. Some of these output data is created as intermediate steps and then connected to other processes to assist in the creation of the final output. The data generated by these intermediate steps is called intermediate data, which is usually (but not always) useless at the end of the model run. You can treat intermediate data as a temporary data that should be deleted after the model runs. However, when you run a model built from ModelBuilder window, the intermediate data is not automatically deleted-it is up to you to delete it.

      ?

    3. Model parameters

      The model parameters are the parameters that are displayed in the Model Tools dialog box. Any variable in the model can be converted to a model parameter.

    4. Working Space Environment

The following four workspace environments can be used in ModelBuilder to simplify model data management:

Current working space:

Tools that support the current workspace environment setting use the specified workspace as the default location for geoprocessing tool input and output.

Scratch workspace:

Tools that support the scratch Workspace environment setting can use the specified location as the default working space for the output dataset. The scratch workspace is dedicated to storing output data that you do not want to keep.

Temp Folder

A temporary folder is a folder location that you can use to write file-based data, such as shapefiles, text files, and layer files. It is a read-only environment managed by ArcGIS.

Temporary GDB

Temporary GDB is the location of a file geodatabase that can be used to write temporary data.

In addition, there is a memory workspace where you can write Geodatabase feature classes and tables to system memory, not to disks.

?

    1. Elaborate model elements

The blue ellipse represents the input data, the green ellipse represents the output data, and the yellow rectangle represents the processing tool

You can change the layout of your graphic according to your preferences

Process status

not ready to run: When you initially drag a tool into the ModelBuilder window, the process is in the "not ready to run" state (the tool is shown in white) because the required parameter values have not been specified.

ready to run: after you have specified all the required parameter values for the tool, the process is in the ready to run state.

running: If the Model tool is displayed in red and the result of the containing message is created in the results window, the process is in the running state.

Run: If you run the model in ModelBuilder, the displayed tools and derived data elements will have a drop shadow that indicates that the process has been run and derived data has been generated.

Keep Intermediate data

You can retain intermediate data in the following three ways:

    • Run the model in ModelBuilder because running the model from the ModelBuilder window does not automatically delete the intermediate data. If you execute the model through a Model dialog box or a Python window, the intermediate data is automatically deleted and is not run in the ModelBuilder window.
    • Set the intermediate data variable to the model parameter. Because model parameters are displayed in the Model Tools dialog box, such data should be retained. Model parameters cannot be marked as intermediate data and will not be automatically deleted.
    • Right-click the data variable and make sure the middle control is unchecked to remove the intermediate marker.

      ?

Display model data

You can use the Add to display option to automatically add model inputs and outputs to the ARCMAP table of contents after the model is executed

Right-click any data variable, and then click Add to display as follows

Using incomplete derived data

The tools used in ModelBuilder typically pre-read data for tool calls, such as field lists, coordinate information, and so on, but some tools call data and parameters that cannot be read-ahead, such as adding fields, calculated fields, and so on, allowing the structure of the data to be predefined, the data change process, etc. The data generated by these tools is incomplete derived data.

  1. to build a tool using ModelBuilder
      1. Create a new model. Create a new model by tapping ModelBuilder in the Geoprocessing menu bar

      1. Join the tool. Find the tools you need to use in the toolbox and drag them directly into ModelBuilder.

      1. Sets the parameters for the tool. Double-click the tool to set the parameters. In ModelBuilder, double-click the tool and open it in Arctoolbox, which is exactly the same setting. If the current model is open on a known map (that is, an existing mxd already exists), the tool can pull the data automatically, and if it is a blank map document, you can browse the data source.

      1. Concatenate multiple tools. Using the Model Builder's connection tool, you can concatenate multiple tools directly into a process.

      1. Distinguish the parameters passed in the previous step and the data parameters selected by the tool. The passed-in parameter is a blue rounded triangular shape, and the selected data is a yellow layer symbol.

      1. Adjust the location of the tool for easy viewing. With the black Arrow "select" Tool, select the tool in the model (rounded rectangle), you can drag the position directly, you can set the display position of each process.

      1. Use automatic layout to display the process very well

      1. Save the model, the model must be saved in the toolbox, so create the toolbox before you save it.

      1. Run the model. Double-click the tool to run the model

    ?

      1. Use parameters. Select input parameters, right-model parameters. After the parameter is set, the word "P" appears on the icon. Other parameters of the tool can be obtained from the right click of the tool, taking the distance of the variable, such as the buffer.

    ?

    ?

    ?

    ?

    ?

    ?

      1. In general, intermediate data is not saved unless it is set to intermediate data;
        Added to the display, you can add to the ArcMap panel during the run

    ?

    ?

      1. Renamed. All tools and parameters can be renamed and the name of the renamed parameter will change

    ?

    ?

ModelBuilder Quick Start

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.