- URL:
- https://<root>/<serviceName>/RasterAnalysisTools/GPServer/ZonalGeometryAsTable
- Methods:
GET
- Version Introduced:
- 11.3
Description
The Zonal
task calculates the geometry measures for each zone in a dataset and reports the results as a table.
Request parameters
Parameter | Details |
---|---|
| The layer that defines the boundaries of the zones. Syntax: This parameter can have either a raster input or a feature input. For raster input, this parameter can be specified as a portal item ID, a URL to a raster image service layer, a cloud raster dataset, or a shared raster dataset. For feature input, this parameter can be specified as either a URL to a feature service layer or a feature collection. Raster input examples:
Feature input examples:
|
| A field on the It can be an integer or a string field of the zone dataset. Example:
|
| The output table feature service name that will be created. You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter. Syntax: A JSON object describes the name of the output or the output table. Output name example:
Output table examples:
|
| The cell size of the output raster that will be created. Example:
|
|
Contains additional settings that affect task processing. This task has the following settings:
|
|
The response format. The default response format is Values: |
Response
When you submit a request, the task assigns a unique job ID for the transaction.
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use the job
to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, you use the job
to retrieve the results. To track the status, you can make a request of the following form:
https://<raster analysis tools url>/ZonalGeometryAsTable/jobs/<jobId>
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form:
https://<raster analysis tools url>/ZonalGeometryAsTable/jobs/<jobId>/results/outputTable
Example usage
The following is a sample request URL for Zonal
:
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/ZonalGeometryAsTable/submitJob
JSON Response syntax
The response returns the output
output parameter, which has properties for parameter name, data type, and value. The content of value
is always the output table item
and the feature service URL.
{
"paramName": <parameter name>,
"dataType": "GPString",
"value": {
"itemId": <item Id>,
"url": <URL>
}
}
JSON Response example
{
"paramName": "outputTable",
"dataType": "GPString",
"value": {
"url": "https://<server name>/server/rest/services/Hosted/<service name>/FeatureServer/0",
"itemId": "351fe8441a1a436d8001124487b02550"
}
}