The Spatial Analysis service contains a number of tasks that allow you to perform common spatial analyses on your hosted data. An overview of the available tasks can be found in Overview of tasks contained in the Spatial Analysis service.
These tasks are also available as tools in the ArcGIS.com map viewer. These tools allow end-users to easily perform analysis against layers hosted in Online as well as other layers they have access to. To learn more about accessing these tasks using the ArcGIS.com map viewer, see the ArcGIS.com help topic Perform analysis. Note that in some cases, the Spatial Analysis REST API has more functionality that is not exposed in the ArcGIS.com map viewer.
Using these tasks consumes credits. For more information on credits, see Service credits overview.
You may want to visit the Analysis page on the ArcGIS Professional website. The Analysis page contains case studies that provide examples showing how analysis can be carried out using ArcGIS Online and ArcGIS for Desktop.
In order to use the analysis tasks, the administrator of your organization needs to grant you certain privileges. To use any of the analysis tools, you will need the Spatial Analysis privilege. If the output of your task is a hosted feature service, as opposed to a feature collection, you also need the two following privileges:
- Create, update, and delete content
- Publish hosted features
Certain tasks need additional privileges such as Network Analysis and GeoEnrichment. If the task requires additional privileges, they will be listed in the task documentation.
The tasks in the Spatial Analysis service all share a common pattern.
- One or more of their input parameters are features. These features can come from a feature service, map service, or in the form of a feature collection. See Feature Input for more information.
- As described in Feature Output, all the spatial analysis tasks create new data. How data is returned to you is controlled by the outputName parameter.
- All tasks have a context parameter which controls certain aspects of task execution. context has two properties; Extent and Spatial Reference.
- All tasks execute asynchronously. That is, when you submit a request, you are handed back a job identifier which you can use to track progress and retrieve results. See Checking job status for more information.