Show / Hide Table of Contents

Class GeoprocessingTask

GeoprocessingTask is used to run geoprocessing task that is published as a web service.

Inheritance
System.Object
GeoprocessingTask
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.Tasks.Geoprocessing
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class GeoprocessingTask
Remarks

GeoprocessingTask is the main component when running geoprocessing tasks. The task might be published through ArcGIS Server or Local server (on the platforms that supports it) using either synchronous execute or asynchronous submit execution type. When GeoprocessingParameters is created it is important to match GeoprocessingExecutionType to the value on the service.

  1. Create GeoprocessingTask using full URL to the target geoprocessing task endpoint.
  2. Create GeoprocessingParameters providing corresponding GeoprocessingExecutionType
  3. Create needed GeoprocessingParameters and add them to Inputs where key is the name of the parameter and value is created parameter.
  4. Set environmental variables on GeoprocessingParameters if needed.
  5. Create GeoprocessingJob with CreateJob(GeoprocessingParameters).
  6. Start listening for status and message changes using MessageAdded event.
  7. Run targeted geoprocessing tool using GetResultAsync() which returns GeoprocessingResult when finished.
  8. Handle returned values accordingly. Access output parameters through Outputs dictionary where key is the name of the output parameter and the value is returned parameter. If used geoprocessing service is configured to use result map service MapImageLayer might be created for you.

Properties

Name Description
GeoprocessingTaskInfo

Gets the metadata of this geoprocessing task.

Source

Gets the source URL that points to a task within an ArcGIS REST geoprocessing service.

Methods

Name Description
CreateAsync(Uri)

Initializes a new instance of the GeoprocessingTask class with the given URL that points to a task within an ArcGIS REST geoprocessing service.

CreateDefaultParametersAsync()

Creates default parameters for a geoprocessing task.

CreateJob(GeoprocessingParameters)

Returns a job that when started will run a geoprocessing task on the service.

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

Relevant samples

Analyze hotspots: Use a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots.
List geodatabase versions: Connect to a service and list versions of the geodatabase.
In This Article
Back to top Copyright © 2022 Esri.