While spatial analysis is a broad term that encompasses a variety of operations available in ArcGIS Maps SDK for Swift, this chapter describes the high-performance and exploratory analysis APIs, which provide classes and members to perform analysis Analysis is a systematic examination of a problem that provides new information. Learn more tasks and quickly visualize and/or persist the results. Because the API is designed to leverage GPU processing power, it is ideal for providing a responsive and interactive user experience. It also provides a framework that allows you to chain together multiple analysis operations while maintaining high performance.

Viewshed on a map

Examples of high-performance spatial analysis include:

  • identifying gaps in security camera coverage to determine where to place additional cameras (viewshed analysis)
  • confirming that tourists have a clear line of sight between an observation deck and several landmarks (line of sight analysis)
  • performing calculations on bands of multispectral raster data to derive new datasets, such as vegetation indices (map algebra operations)

Analysis options

A variety of spatial analyses can be performed using the analysis APIs. Analysis results can be visualized interactively in a scene view A scene view is a user interface that displays scene layers and graphics in 3D. It uses a camera to control the visible area of the scene and supports user interactions such as pan, zoom, tilt, and rotate. Learn more or a map view A map view is a user interface that displays map layers and graphics in 2D. It controls the area (extent) of the map that is visible and supports user interactions such as pan and zoom. Learn more and updated in near real-time as parameters change. Except for the exploratory analysis tools, which operate exclusively on the visible contents of a scene view, the spatial analysis APIs operate directly on the underlying data, independent of the current view display. This produces more accurate and consistent analysis results. These data-driven analysis results can also be exported to a new dataset for later use or further analysis.

As an alternative to high-performance and exploratory (GPU-based) analysis, you can use geoprocessing Geoprocessing is a GIS operation that is used to manipulate data. A typical geoprocessing operation takes an input dataset, performs an operation on that dataset, and then returns the result of the operation as an output dataset. Learn more tools to implement spatial analyses. Because these tools rely on a server to return results, they do not provide the same interactive experience as the high-performance analysis APIs.

Analysis accuracy and results persistence

For high-precision analysis in 2D or 3D, use the functionality exposed by the following classes: ViewshedFunction, LineOfSightFunction, DiscreteFieldFunction, ContinuousFieldFunction, and BooleanFieldFunction. This API operates on the underlying data directly, independent of the current view display, and produces results that can be persisted for later use. The data used for these analyses comes from a ContinuousField, DiscreteField, or BooleanField, representing the set of values in an input dataset.

Conversely, the exploratory analysis functionality exposed by ExploratoryViewshed and ExploratoryLineOfSight operate on the 3D surface, layers, and objects currently visible in a scene view. The accuracy of their calculations is based on the current level of detail, which can vary based on the scene view’s camera position and graphics hardware specifications. Because this analysis relies on the 3D display of objects in a scene view, it cannot be implemented in a map view. The results created by these classes cannot be persisted.

The following table summarizes the capabilities of the various spatial analysis tools available in the API.

  • Full support
  • Partial support
  • No support
Interactive display in 2DInteractive display in 3DCan persist resultsHigh accuracyConsiders all 3D objects in the viewSupports projected data
ViewshedFunction
LineOfSightFunction
Map algebra operations
ExploratoryViewshed
ExploratoryLineOfSight
  1. Analysis is based on a single terrain dataset rather than the contents of a map or scene view. The terrain dataset may include buildings and other 3D objects.
  2. If results are calculated in WGS 84.
  3. Uses any number of raster datasets required for the analysis.
  4. Accuracy varies according to the scale at which the data is displayed.

Tutorials

Samples