- URL:
- https://<rasteranalysistools-url>/SubsetMultidimensionalRaster
- Methods:
GET
- Version Introduced:
- 10.8
Description
The Subset
task creates a subset of a multidimensional raster by slicing data along defined variables and dimensions.
Request parameters
Parameter | Details |
---|---|
(Required) | The portal folder ID, portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be added to the image collection. At least one type of input needs to be provided in the JSON object. Syntax: A JSON object describes the input multidimensional raster. Example
|
(Required) | The output image collection name or URL. The image service must exist before you add the images. If the hosted image service is already created, the portal item ID or service URL can be given to the service tool. The output path of the raster dataset generated in the raster store will be used to update the existing service definition. The service tool can also generate a new hosted image service with the given service properties. The output hosted image service is stored in a raster store and shared on either the Raster Analysis Image Server or Image Hosting Image Server depending on the Enterprise configuration. Syntax: A JSON object describes the output multidimensional or multiband raster. Example
At least one type of input needs to be provided in the JSON object. |
| The variable or variables to be analyzed. If the input raster is not multidimensional, the pixel values of the multiband raster are considered the variable. If the input raster is multidimensional and no variable is specified, all variables with the selected dimension will be analyzed. For example, to find the years in which temperature values were highest, specify temperature as the variable to be analyzed. If you do not specify any variables and you have both temperature and precipitation variables, both variables will be analyzed, and the output multidimensional raster will include both variables. Syntax: A list containing the variables. Example
|
| Specifies the dimension interval for which the data will be analyzed.
Syntax: A string representing the method. Example
|
| This slices the data based on the dimension name and the minimum and maximum values for the range. This parameter is required when the Syntax: a list of dictionary objects. Example
Example
|
| This slices the data based on the dimension name and value. This parameter is required when the If dimension is Syntax: a list of dictionary objects. Example
Example
|
| The dimension along which the variables will be sliced. Syntax: A string representing the dimension name. Example
|
| The beginning of the first interval. This interval is used to iterate through the dataset. This parameter is required when the Syntax: a string representing the start of the first iteration. Example
|
| The end of the first interval. This interval is used to iterate through the dataset. This parameter is required when the Syntax: a string representing the end of the first iteration. Example
|
| The frequency with which the data will be sliced. This parameter is required when the Syntax: A double value. Example
|
| Specifies the iteration unit. This parameter is required when the
Syntax: A string representing the iteration unit. Example
|
| Contains additional settings that affect task execution. This task has the following settings:
|
|
The response format. The default response format is html. Values: |
Example usage
The following is a sample request URL for Subset
:
https://machine.domain.com/webadaptor/rest/services/System/RasterAnalysisTools/GPServer/SubsetMultidimensionalRaster?inputMultidimensionalRaster={"itemId": {"1780d648db3545bba8661ad98df824a4"}}&outputName={"serviceProperties":{"name":"subset_op"}}&variables=["temp"]&dimensionDefinition=BY_ITERATION&dimension=StdTime&startOfFirstIteration=2013-05-17T00:00:00&endOfFirstIteration=2013-05-17T03:00:00&iterationStep=3&iterationUnit=HOURS&f=json
The following is a sample POST request for Subset
:
POST /webadaptor/rest/services/System/RasterAnalysisTools/GPServer/SubsetMultidimensionalRaster HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
inputMultidimensionalRaster={"itemId": {"1780d648db3545bba8661ad98df824a4"}}&outputName={"serviceProperties":{"name":"subset_op"}}&variables=["temp"]&dimensionDefinition=BY_ITERATION&dimension=StdTime&startOfFirstIteration=2013-05-17T00:00:00&endOfFirstIteration=2013-05-17T03:00:00&iterationStep=3&iterationUnit=HOURSf=json
Both of the above requests use the following parameters and values in their requests:
inputMultidimensionalRaster={"itemId": {"1780d648db3545bba8661ad98df824a4"}}&
outputName={"serviceProperties":{"name":"subset_op"}}&
variables=["temp"]&
dimensionDefinition=BY_ITERATION&
dimension=StdTime&
startOfFirstIteration=2013-05-17T00:00:00&
endOfFirstIteration=2013-05-17T03:00:00&
iterationStep=3&
iterationUnit=HOURS
f=json
Response
When you submit a request, the task assigns a unique job ID for the transaction.
Syntax:
{ "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 Check job status. Once the job has successfully completed, use the job
to retrieve the results. To track the status, you can make a request of the following form:
https://<rasterAnalysisTools-url>/SubsetMultidimensionalRaster/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://<rasterAnalysisTools-url>/SubsetMultidimensionalRaster/jobs/<jobId>/results/result
JSON Response example
The response returns the results
output parameter, which has properties for parameter name, data type, and value. The content of value is always the image service URL.
{
"paramName": "result",
"dataType": "GPString",
"value": {
"itemId": "f121390b85ef419790479fc75b493efd",
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}