Skip to content

ArcGIS Maps SDK for .NET provides spatial analysis APIs that allow you to leverage the power of the device GPU to quickly perform analysis. Results are calculated using the full precision of the source data, and can be displayed dynamically in a map view or scene view. Analysis with these APIs can be performed while offline, and results can be persisted to a file on the device.

In addition to the spatial analysis APIs, ArcGIS Maps SDK for .NET also provides exploratory (display-driven) APIs that allow you to visually explore data in a scene view without the ability to persist them. Geoprocessing APIs allow you to run analysis on a server and return results for display in a map view or scene view.

  • Spatial analysis APIs can provide an interactive experience in a map view or scene view, rendering results dynamically and updating them as analysis parameters change. Results are accurate and consistent, since the resolution of results is at the full resolution of the input data rather than the current display resolution. Spatial analysis APIs allow you to perform analysis while offline and can persist results to a file on the device.
  • Exploratory (display-driven) APIs allows you to interactively explore data visually in a scene view. Accuracy of results depend on the resolution of the display and therefore are not consistent. Exploratory analysis results cannot be persisted on the device.
  • Geoprocessing APIs provides accurate results and can provide result features or geometry for display in a map view or scene view. Since processing takes place on a server rather than on the device GPU, performance is considerably slower. It is not well suited for interactively exploring analysis results.
Interactive display in 2DInteractive display in 3DFast GPU processingCan persist resultsAccuracy at full data resolutionSupports projected data
Spatial analysis APIs1
Exploratory analysis APIs
Geoprocessing APIs
Full supportPartial supportNo support
  • 1. Supported for: line of sight; map algebra (for results calculated in WGS 84)

Spatial analysis APIs

Spatial analysis APIs allow you to perform spatial analysis in a map view or scene view (or independently of a view). Spatial analysis APIs leverage the device GPU for fast performance, allowing you to interactively explore analysis results visually and see updates quickly when analysis parameters change. The accuracy of these results is determined by the resolution of the input data, making them consistent and accurate regardless of the current view display. The results can also be persisted to a file on the device or fed into additional operations. Spatial analysis APIs are ideal for use cases that require both an interactive experience and accurate results that can be persisted or used for further analysis.

High-performance spatial analysis viewshed on a map

General steps to implement spatial analysis in your application:

  1. Create input data for analysis: Create a continuous, discrete, or boolean field to represent the input data for analysis. The input data will vary according to the type of analysis you want to perform. For example, viewshed and line of sight analyses require terrain (elevation) data, while a map algebra operation to calculate a vegetation index requires multispectral satellite imagery.
    • ContinuousField: floating-point values to represent measurements that change across a surface, such as elevation or temperature.
    • DiscreteField: integer values to represent nominal categories, for example, land cover or soil type.
    • BooleanField: binary values to represent the presence or absence of a particular characteristic.
  2. Define analysis: For some analyses, you need to configure input parameters for things like observer location, target height, and analysis extent using the appropriate parameter object, for example, ViewshedParameters or LineOfSightParameters. Other analyses, like those that use map algebra, may require chaining multiple functions together with methods or operators to produce a result.
  3. Create and evaluate an analysis function: Create an analysis function using the appropriate class for the analysis type, such as ViewshedFunction, LineOfSightFunction, DiscreteFieldFunction, and so on. Add the function to a FieldAnalysis for dynamic evaluation (see following step) or manually evaluate the function to obtain the analysis result.
  4. Export and visualize results: When displaying results, apply an appropriate renderer to effectively visualize the data, such as a StretchRenderer for continuous data or a ColormapRenderer for discrete or boolean data. Spatial analyses that return ContinuousField, DiscreteField, or BooleanField can be visualized in a FieldAnalysis for immediate feedback. The visualization updates automatically when function parameters change. In addition to visualizing the results, you can export them to a new raster dataset for later use or further analysis.

Summary of the spatial analysis APIs:

  • Results are calculated for the full extent and resolution of the input data, and are consistent as you interact with the view.
  • Fast, dynamic results that update as you interact with the geoview (either map view or scene view).
  • Results can be persisted to a file on the device or fed into additional operations.
  • Supported in both 2D and 3D.
  • For visibility analyses, visibility is evaluated using a single input data source (surface). Building layers and other 3D objects in a scene view are not considered in the analysis.

Exploratory analysis

Exploratory analysis APIs provide fast, interactive, and dynamic results in a scene view. They allow you to define analyses that consider all data in the current scene view and render results quickly. Analysis results are displayed in an analysis overlay and update dynamically as layers are added or removed, features are updated, camera position changes, and so on.

Exploratory analysis APIs produce results that are strictly for display and rendered dynamically by the GPU, using the surface and all 3D objects currently visible in the scene view to perform analysis (such as evaluating visibility). Results of exploratory analysis are quickly rendered in the scene view, but cannot be persisted on the device. Because the resolution of data in the view changes according to the level of detail (distance from the camera to the surface), the analysis results will likely change as you interact with the scene view.

Animation showing how a viewshed changes according to scale.

Summary of exploratory analysis:

  • Fast, dynamic results that update as you interact with the scene view.

  • Results are calculated at the resolution of the display and are not consistent as you interact with the scene view.

  • Analysis only considers data that is within the display's field of view.

  • For viewshed or line of sight, all visible 3D content in the scene view is considered in the analysis, including terrain, buildings, and trees.

  • Results are for display only and do not produce features or geometry that can be used for hit testing or persistent storage.

  • Only supported in 3D.

Geoprocessing

Geoprocessing APIs provide another way to perform analysis using a suite of specialized GIS analysis tools running as a service. The results returned from a geoprocessing task vary according to how it was authored, but may include a map image, output features, raster images, and other types of data. Geoprocessing may give you the ability to access the resulting features (or geometry) from the task, so you can save your results or use them for further analysis. Geoprocessing often requires one or more inputs from the client, and depending on the task, can take a few seconds to several minutes to complete before returning results from the server.

A geoprocessing service contains one or more geoprocessing tasks. A geoprocessing task is a tool that runs as a service. Its execution and outputs are managed by the service. You can run these tools from a Native Maps SDK app using classes in the Geoprocessing API.

General steps to run a geoprocessing task in your application:

  1. Create a GeoprocessingTask using the full URL to the target geoprocessing task endpoint.
  2. Create GeoprocessingParameters and define the GeoprocessingExecutionType.
  3. Create GeoprocessingParameter objects to define required inputs and add them to the GeoprocessingParameters.Inputs collection.
  4. Set environment variables on GeoprocessingParameters if needed.
  5. Create a GeoprocessingJob by calling the job creation method on the geoprocessing task, passing the geoprocessing parameters.
  6. If running asynchronously, listen for job changes on the GeoprocessingJob.
  7. Run the geoprocessing job and if it completes successfully, get the GeoprocessingResult.
  8. Handle the returned values. Output parameters are accessed as a dictionary on GeoprocessingResult. If the geoprocessing service is configured to use a result map service then the result may also contain a map image layer.

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