Spatial analysis

Show the input data and results for different types of feature analysis.

Spatial analysis is the process of using analytical techniques to find relationships, discover patterns, and solve problems with geographic data. This section covers how to use ArcGIS REST JS to perform feature analysis with the spatial analysis service and then show the results in an OpenLayers map.

What is feature analysis?

Feature analysis is the process of using the spatial analysis service to perform server-side geometric and analytic operations on feature data. To perform a feature analysis, you input feature data (typically a feature layer), execute one or more operations with ArcGIS REST JS, then display the output in a map to visualize and evaluate the results.

Feature analysis can help solve many different types of problems. For example, you can perform feature analysis in order to:

  • Understand where features are or where multiple features exist.
  • Measure sizes, shapes, and distributions of features.
  • Discover and quantify relationships between features.
  • Make predictions based on existing or theoretical patterns and relationships.

The operation you use depends on the type of problem you are trying to solve. Each operation reveals information about the input layers, and can return results as a new hosted feature layer. Operations are job requests performed server-side that are designed to process large amounts of feature data in the ArcGIS cloud infrastructure.

Types of feature analysis

You can perform many different types of feature analyses with the spatial analysis service. The operations are grouped into the following categories:

  • Find data: Find and export feature data using SQL or spatial queries.
  • Combine data: Create new feature data by combining multiple data sources.
  • Summarize data: Calculate statistics on feature data.
  • Analyze patterns: Identify spatial patterns and relationships in feature data.
  • Calculate geometries: Create new feature data and perform calculations on existing data.

How to perform feature analysis

To perform a feature analysis, you need to provide feature data as input, then use ArcGIS REST JS to access the spatial analysis service and execute an operation. You must authenticate requests to the spatial analysis service with user authentication in order to perform spatial analysis operations.

The steps to access the service using OpenLayers and ArcGIS REST JS are:

  1. Prepare feature data to be used in the analysis.
  2. Select an operation based on the problem you want to solve.
  3. Get the spatial analysis service URL from your organization.
  4. Submit a job request to the service using ArcGIS REST JS with your chosen operation and parameters.
  5. Check the status to see when the job is complete.
  6. Get the results.
  7. Display the results on a map using OpenLayers.

Example

This example performs a hot spot analysis to identify hot and cold areas in point data for parking violations. The application allows you to sign in with your ArcGIS account and uses user authentication to get an access token. The token is used to access the basemap styles service as well as the spatial analysis service. ArcGIS REST JS is used to get the URL for the spatial analysis service and then make a call to the service to perform a hotspot analysis. The resulting feature layer is displayed in the map.

Learn how to build this application in the Perform a feature analysis tutorial.

Run a hot spot analysis on parking violation data in San Francisco.

Tutorials

OpenLayersRelated tutorials

Go to these tutorials to find, create, and enrich data for spatial analysis.

Go to these tutorials to learn how to perform analyses interactively with the Map Viewer and programmatically with ArcGIS REST JS, ArcGIS API for Python, and ArcGIS REST API.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.