Class GeoprocessingTask
GeoprocessingTask is used to run geoprocessing task that is published as a web service.
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.
- Create GeoprocessingTask using full URL to the target geoprocessing task endpoint.
- Create GeoprocessingParameters providing corresponding GeoprocessingExecutionType
- Create needed GeoprocessingParameters and add them to Inputs where key is the name of the parameter and value is created parameter.
- Set environmental variables on GeoprocessingParameters if needed.
- Create GeoprocessingJob with CreateJob(GeoprocessingParameters).
- Start listening for status and message changes using JobChanged event.
- Run targeted geoprocessing tool using GetResultAsync() which returns GeoprocessingResult when finished.
- 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 a 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. |
CreateAsync(Uri, Credential) | 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
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |