Hide Table of Contents
What's New archive
An overview of geoprocessing with the ArcGIS JavaScript API

Geoprocessing allows you to automate and chain together GIS analysis operations. You do this through creating custom tools and models with ArcGIS. A model generally consists of a series of tools you might see in ESRI's ArcToolbox, chained together in a logical way to accomplish a specific thing. For example, a model might interpolate an elevation surface from a set of input spot heights, then create contours from that surface. Instead of manually opening two different tools from ArcToolbox, you just run the model. If you need to do this operation on 100 datasets, you can automate the model to run 100 times. This makes geoprocessing both powerful and convenient.

The geoprocessor class in the ArcGIS JavaScript API gives you access to geoprocessing models that run on ArcGIS Server. These models are exposed through geoprocessing services. These services are useful because geoprocessing can be computationally intensive and requires GIS software to run the tools and models. It's often more efficient to send geoprocessing jobs to a centralized server instead of installing software on each machine and using each machine's processing power to perform the analysis.

To use the Geoprocessor, you need to know three things:

  • The URL of the geoprocessing model (task), that you're using.
  • The required inputs and outputs of the task
  • Whether the task is asynchronous or synchronous

You can discover all of the above items in the Services Directory, which is a browseable depiction of what's available on an ArcGIS Server. The URL for the Services Directory is http://<server name>/<instance name>/rest/services. Ask your ArcGIS Server administrator if you are unsure how to construct this URL.

The remaining topics in this section explain how to create the geoprocessor, discover the required parameters for a task, and run the task.

Show Modal