This document is archived and information here might be outdated.  Recommended version.


Geoprocessing (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Geoprocessing (ArcObjects .NET 10.6 SDK)

Geoprocessing


Supported with:
  • Engine
  • ArcGIS for Desktop Basic
  • ArcGIS for Desktop Standard
  • ArcGIS for Desktop Advanced
  • Server
Library dependencies: Version, System, SystemUI, Geometry, GraphicsCore, Display, Server, Output, Geodatabase, GISClient, DataSourcesFile, DataSourcesGDB, DataSourcesOleDB, DataSourcesRaster, DataSourcesNetCDF, GeoDatabaseDistributed, GeoDatabaseExtensions, Carto, NetworkAnalysis, Location, GeoAnalyst, Animation, Maplex

Additional library information: Contents, Object Model Diagram

The Geoprocessing library contains the objects that implement the unified geoprocessing framework. The geoprocessing framework is intended to meet the functional requirements to perform many geographic information system (GIS) tasks and to provide a flexible framework for the use, creation, and sharing of tools.

See the following sections for more information about this namespace:

About geoprocessing

Geoprocessing is a fundamental part of ArcGIS. Whether you're a new user or an expert, geoprocessing will become an essential part of your day-to-day work with ArcGIS. Geoprocessing provides the data analysis, data management, and data conversion tools necessary for all GIS users.
Geoprocessing consists of operators, called tools, that operate on the data within ArcGIS (tables, feature classes, rasters, triangulated irregular networks [TINs], and so on), and perform tasks that are necessary for manipulating and analyzing geographic information across a wide range of disciplines. Each geoprocessing tool performs an essential operation on geographic data, such as projecting datasets from one map projection to another, adding fields to a table, or creating buffer zones around features. ArcGIS includes more than 400 geoprocessing tools. A geoprocessing tool takes ArcGIS datasets as inputs (such as tables, feature classes, rasters, and computer-aided design [CAD] files), applies an operation against the data, and creates a newly derived dataset as output. See the following illustration:
Many uses of GIS involve the repetition of work, and this creates the need for a framework to provide automation of workflows. Geoprocessing answers this need by providing a rich set of tools and a mechanism to combine a series of tools in a sequence of operations using models and scripts.

Geoprocessing framework

The core idea behind geoprocessing is to provide a flexible framework to allow you to quickly and easily turn your ideas into new geoprocessing tools. A model, for example, is a tool you can build using ModelBuilder, which is available with ArcGIS Desktop. This topic explores this idea that geoprocessing is a way to execute and create tools. This topic also explains how tools are managed, as well as the different types of geoprocessing tools.

For further information see:

Using geoprocessing

Toolboxes

A toolbox is a persistent entity that contains geoprocessing tools. It takes the form of a .tbx file on disk or a table in a geodatabase. There is a collection of system toolboxes installed with ArcGIS. Toolboxes are composed of tools that are grouped by functionality. For example, the Analysis Toolbox contains tools for overlay and proximity analyses. Some toolboxes are installed as part of an extension. For example, the Spatial Analyst Toolbox is only available when Spatial Analyst is installed. A toolbox is the mechanism for managing and sharing tools.
You can create toolboxes in the ArcToolbox window or the ArcCatalog tree to hold the tools you want to use.

Tools

As mentioned, a geoprocessing tool can be referred to as an operation that can take an input or set of inputs and generate one or more outputs. These inputs are referred to as parameters. Most geoprocessing tools provided by Esri are implemented as Component Object Model (COM) Function Tools contained in system toolboxes. The four types of geoprocessing tools are as follows:
  • Model—A model is a tool that you author to automate your work flow, and keep track of your geoprocessing tasks. A model consists of one process or, more commonly, multiple processes strung together. A process consists of a tool and its parameter values. The most important thing to remember is models are just tools. They behave exactly like other tools. A model tool runs your GIS workflow to generate a new output.
  • Script—A script can be a tool that you author using a scripting language such as Python. Scripts are analogous to models, in that they can be used to automate a geoprocessing workflow. All geoprocessing tools can be accessed and executed inside a script.
  • Function—A function tool is built into the system and implemented via a programming language such as Visual C++ or .NET with COM interfaces. A function tool requires implementing a minimum of two objects: a function object that implements IGPFunction and a function factory object that implements IGPFunctionFactory. The Tool Creation section in this topic focuses on how to extend geoprocessing with function tools.
  • Custom—A custom tool is similar in concept to a function tool. However, unlike a function tool with a static definition (that is, behavior and parameters), a custom tool can have a dynamic parameter definition (for example, models). A custom tool is also referred to as a tool extension. Custom tools are built into the system and implemented via a programming language such as Visual C++ or .NET with COM interfaces. A custom tool requires implementing four interfaces: IGPToolExtension, IGPToolExtensionFactory, IClone, and IPersistStream.

Tool execution

A geoprocessing tool is executed by a geoprocessor. A geoprocessor is a helper object that simplifies the task of executing geoprocessing tools. The geoprocessor contains properties and methods that make it possible to execute tools, set global environment settings, and examine the resulting messages. As previously explained, toolboxes define the set of available tools for the geoprocessor. Toolboxes can be added and removed from the geoprocessor.

Tool creation

The geoprocessing framework is fully extensible by creating geoprocessing tools and data types. Most geoprocessing tools provided by Esri are implemented as COM function tools. A geoprocessing function tool is the low-level implementation of a geoprocessing tool. Geoprocessing function tools are written in a system language (such as C++) and support a few standard COM interfaces that are used by the geoprocessing framework to load and execute the tool.
A geoprocessing function tool performs the following basic tasks:
  • Declares itself, giving its name, license information, and the number of parameters it takes.
  • Publishes all the details about the parameters it takes.
  • Given a set of parameters provided by the user, validates that they are correct.
  • Executes the function.
Each of these tasks are described in detail in the topic Building a custom geoprocessing function tool. This topic is for developers wanting to extend geoprocessing by building tools using ArcObjects.

For further information see:

How to run a geoprocessing tool