Introduction to spatial analysis

This topic provides an overview of the key concepts and terminology you should be familiar with before performing spatial analysis.

What is spatial analysis?

Spatial analysis is the process of using analytical techniques to find relationships, discover patterns, solve problems and derive insights with geographic data. The goal of every analysis is to turn data into information.

Some typical uses of spatial analysis include the following:

  • Identify optimal locations for new housing developments based on factors like land use, transportation networks, and environmental constraints.
  • Calculate slope, aspect and visibility, to assess the impact of natural disasters.
  • Find suitable locations for facilities like retail stores, warehouse, or hospitals taking into account factors like population density, accessibility, and proximity to resources.
  • Use spatial statistics to identify hotspots, cluster patterns, and correlations with demographic or environmental factors to inform law enforcement strategies.
  • Plan utility infrastructure routes and mitigate risks like wildfires or power outages by analyzing terrain data and vegetation cover.

How does spatial analysis work?

ArcGIS supports server-side and client-side spatial analysis. The steps you use to perform an analysis depends on the type of problem you are solving, data available, and API you are using.

Client-side

Client-side analysis typically involves using APIs such as the ArcGIS Maps SDK for JavaScript or the ArcGIS Maps SDKs for Native Apps to execute client-side functions in your application. Client-side analysis is performed on the data already on your device or in memory so does not require any additional authentication, licenses, or charges. The two types of client-side analysis you can perform are Geometry analysis and 3D visual analysis.

The general steps to perform client-side spatial analysis are:

  1. Access or create your input geometry.
  2. Use an API to call a geometry or 3D function.
    • Data processing occurs client-side.
    • Results are stored in memory.
  3. Display and evaluate the results.

Below is an example of performing a client-side geometry analysis to calculate the buffer of a single geometry using the ArcGIS Maps SDK for JavaScript:

Use dark colors for code blocksCopy
1
2
const bufferGeometry = geometryEngine.geodesicBuffer(geometry, 2000, "meters");
console.log("The buffer geometry is:" + bufferGeometry);

Server-side

Server-side analysis involves making asynchronous requests to a server endpoint. All transactions are job requests (long transactions) and require multiple requests to the service to process the job, monitor the status, and then get the results. This is typically done using APIs such as the ArcGIS API for Python, ArcGIS REST JS, or the ArcGIS REST API. The two types of server-side analysis you can perform are feature analysis and raster analysis.

The general steps to perform server-side spatial analysis are:

  1. Prepare your input hosted layers or feature collections. Data is prepared as a hosted layer in your portal.
  2. Make a request to the feature analysis service or raster analysis service.
    • Data processing occurs server-side.
    • Results are stored as a new hosted layer.
  3. Display and evaluate the results.

Below is an example of performing a server-side feature analysis to calculate the buffers of all the features in a layer using the ArcGIS API for Python:

ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS API for Python
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
            const job = await EsriGeoprocessor.submitJob(analysisURL, jobParams)

            const res = await job.waitForJobCompletion({interval:5000, statusCallback: (j)=>{
                console.log(`Job status: ${j.jobStatus}`)
            }})

            if (res.jobStatus === "job-succeeded"){
                const r = await res.fetchResultData("bufferLayer")
                const resultLayer = new EsriFeatureLayer({portalItem: {id: r.value.itemId}})
                resultLayer.when(()=>{return resultLayer.queryExtent();}).then(res=>{view.goTo(res.extent)})
                map.add(resultLayer)
            }

Types of spatial analysis

ArcGIS supports four general types of spatial analysis. Each type requires following a specific workflow and supports the development of a specific type of application.

  1. Geometry analysis: Perform one or more spatial operations on client side points, polylines, or polygons to solve a geometric problem.

  2. Feature analysis: Perform server-side geometric and analytic operations on large numbers of feature data with the feature analysis service

  3. Raster analysis: Perform server-side geometric and analytic operations on raster data with the raster analysis service.

  4. 3D visual analysis: Calculate and display spatial information derived from client-side terrain, buildings, and other 3D objects contained within a scene.

Comparison

The table below provides a quick comparison between the types of analyses:

Type of analysisExecution modeData sizeInput data typesOutput data typesStore resultsSupporting APIs
Geometry analysisClient-sideSmaller datasetsGeometryGeometry, Boolean, NumberFalse
  • ArcGIS Maps SDK for JavaScript
  • ArcGIS Maps SDKs for Native Apps
  • ArcGIS API for Python
Feature analysisServer-sideLarger datasetsFeature collections or hosted feature layersFeature collection or hosted feature layerTrue
  • ArcGIS Maps SDK for JavaScript
  • ArcGIS REST JS
  • ArcGIS API for Python
  • ArcGIS REST API
Raster analysisServer-sideLarger datasetsHosted imagery layersHosted imagery layerTrue
  • ArcGIS Maps SDK for JavaScript
  • ArcGIS REST JS
  • ArcGIS API for Python
  • ArcGIS REST API
3D visual analysisClient-sideSmaller datasetspoints, point cloud, 3D objects, or integrated mesh.Analysis overlayFalse
  • ArcGIS Maps SDK for JavaScript
  • ArcGIS Maps SDKs for Native Apps
  • ArcGIS API for Python

Terminology

Below is a list of the common terms that are used to perform spatial analysis:

  • Geometry: A geometry is a geometric shape that contains one or more coordinates and a spatial reference. Points contain a single set of coordinates, polylines contain two or more coordinates, and polygons contain three or more coordinates. Geometries are used to define the shape and position of graphics and features.

  • Feature: A feature is a single record, also known as a row, that represents a real-world entity. Features can be composed of a geometry (point, polyline, or polygon) and attributes or only attributes without geometry, and are typically stored in a feature layer, table or a feature collection.

  • Raster: A raster is a matrix of cells (or pixels) organized into rows and columns (or a grid) where each cell contains a value representing information, such as temperature. Rasters include digital aerial photographs, imagery from satellites, digital pictures, and scanned maps.

  • Hosted layer: A hosted layer is an item in a portal that contains the properties and settings for a hosted data service or a layer in a hosted data service. A hosted layer is used to manage the properties of the item and the hosted data service settings. The most common types of hosted layers are hosted feature layers, hosted vector tile layers, hosted map tile layers, and hosted imagery layers.

  • Portal: A portal, also known as an ArcGIS portal, is a website with tools that can be used to create, manage, access, and share geospatial content and resources. It supports security and authentication, content and data service management, user and group management, and site administration. A portal contains tools and applications such as the content manager, organization manager, Map Viewer, and Scene Viewer that can be used to create and manage content, import data, create developer credentials, manage users and groups, and manage the overall site.

  • Job request: A job request is an HTTPS request to a service that starts a server-side operation (or job) with a long duration. A job request returns a job ID that is used by client applications to make subsequent HTTPS requests to determine job status updates and, when it is complete, to download the final job output. Job requests are used for longer, typically complex operations

  • Access token: An access token is an authorization string that provides secure access to content, data, and functionality in ArcGIS location services. The format is either an API key or an OAuth 2.0 token. Access tokens define the scope and permissions available to your application, and their capabilities vary based on the type of authentication used to obtain them. There are three types of authentication that can be used to obtain an access token: API key authentication, User authentication (formerly ArcGIS identity), and App authentication.

  • Map Viewer: Map Viewer is a browser-based mapping tool that can view, create, and save web maps. Map Viewer can be used to perform common GIS tasks, such as to explore the contents of a web map, change the basemap, add data layers and styles, perform measurements, and execute different types of data analyses.

Tutorials

Find spatial relationships

Determine the spatial relationship between two geometries.


Calculate geometries

Perform buffer, intersect, union, and other geometric operations.


Find length and area

Get the length of a line and the area of a polygon.


Display projected geometries

Project geometries to a new spatial reference in a map.


Find data sources

Discover data in ArcGIS that you can use for feature analysis.


Create data sources

Import, create, and generate data for feature analysis.


Enrich data sources

Enrich data with demographic information and local business facts using the spatial analysis service.


Find and extract data

Find data with attribute and spatial queries using find analysis operations.


Summarize data

Aggregate and summarize features using summarize analysis operations.


Discover patterns in data

Find patterns and trends in data using spatial analysis operations.


Perform a feature analysis

Perform a feature analysis using ArcGIS REST JS.


Perform an analysis using raster operations

Learn how to perform raster analysis using a raster operation


Create a raster function template

Perform a raster analysis with a raster function template.


Display a viewshed

Perform and display a viewshed analysis in a 3D scene.


Display a line of sight

Perform and display a line of sight analysis in a 3D scene.


Measure a distance in 3D

Evaluate the horizontal, vertical, and direct distances between two points in a 3D scene.


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