Geoprocessor library and tool reference


About the geoprocessor library and tool reference

ESRI.ArcGIS.Geoprocessor is a native .NET library and wraps working with the ArcObjects Component Object Model (COM) GeoProcessor. The wrapper is meant to provide .NET developers with better design-time information (IntelliSense), validation, and event handling. The library contains the Geoprocessor class on which the Execute and ExecuteToolByName methods initiate the geoprocessing process. The library also contains a primary interface—IGPProcess—that all tools and models must implement to be used by the geoprocessor. 
The geoprocessor can use toolboxes via a .NET wrapper or consume the toolbox via the name. Managed assemblies for all system toolboxes come with the install. For more information, see Geoprocessor managed assembly.
You can generate toolbox wrappers for your custom toolboxes using the ArcGIS Toolbox Reference dialog box in Visual Studio. When the toolbox wrapper is created, the physical location of the .tbx file is stored with the wrapper. This location must be available to the geoprocessor, whether in the local process or remotely in ArcSOC.exe. 
Input parameters for an IGPProcess are provided in an object array. As an example, parameters for the Clip tool consist of two feature classes (COM object references), a string path, and a string value. In general, you are still working with ArcObjects (components in the ESRI.ArcGIS.Geoprocessing library) to work with the tool.
ESRI.ArcGIS.Geoprocessing is a COM component library and contains the fine-grained geoprocessing components of ArcObjects, which creates and consumes geoprocessing tools. It includes interfaces, such as IToolboxWorkspace, IGPToolbox, IGPTool, and IGPParameter.
The Execute method on IGeoProcessor or IGPTool is used to initiate the geoprocessing process. The input parameters for an IGPTool are IGPParameter types. As an example, parameters for the Clip tool are represented as IGPParameters where the values are strings referencing paths to feature classes. These interfaces are wrapped into managed toolbox assemblies. The GPServer object wraps working with the ArcObjects COM GeoProcessor for use within the ArcGIS for Server architecture.