- URL:
- https://<rasteranalysistools-url>/GenerateRasterCollection
- Methods:
GETPOST- Version Introduced:
- 10.4
Description
The Generate operation performs batch raster analysis on raster item or items stores in image services. The input image services of this service task must be image service published from mosaic dataset and should be hosted in the same Enterprise GIS.
Request parameters
| Parameter | Details |
|---|---|
(Required) | Specifies the output hosted image service. If the hosted image service already exists, use either the Only one of the three formats above is needed as input. If multiple inputs are given in a single JSON, the Example: |
(Required) | The collection builder is used by the tool to define the input image collection. It is a template that contains arguments including the source mosaic dataset path, filters that extract a subset from the input data source, and many more. Currently, this tool only supports |
(Required) | The arguments defined by the collection builder.
Example: |
(Optional) | JSON string of the raster function template. This raster function template will be used to process every image item in the input collection, or every group of image items if the raster function template was set to use “Item Group” mode. If no raster function template given, the tool will copy the image item from the input image collection based on the collect builder arguments to the output image service. |
(Optional) | The JSON string to specify the raster function arguments’ value. This parameter is optional, as the arguments value can also be defined in the function template. For example, if the input image service contains two types of imagery as "MS" (multi-spectral) and "Pan" (Panchromatic), the function template is using "Item Group" mode to pansharpen "MS" and "Pan" images together to get a pan-sharpened image. The raster variable names defined in the function template should be "MS" and "Pan", respectively. Example for Remap function arguments: |
(Optional) | Sets the output image service's key metadata properties. Example: |
(Optional) | A Boolean flag that determines whether to batch generate the persisted cloud raster format (CRF) images in the raster store. The default value is Values: |
| The response format. The default format is Values: |
Example usage
The following is a sample request URL for the Generate operation:
https://organization.example.com/<context>/rest/services/System/RasterAnalysisTools/GPServer/GenerateRasterCollection/submitJob?outputCollectionName={"serviceProperties": {"name": "<name of your choice>"}}&collectionBuilder=SIMPLE_COLLECTION&collectionBuilderArguments={"DataSource":{"url":"https://rdvmdb02.esri.com/server/rest/services/Landsat_MSPAN/ImageServer"},"WhereClause":"Tag = `MS`"}&generateRasters=true&f=pjsonJSON Response example
The response returns the output output parameter, which has properties for parameter name, data type, and value. The content of the value is always the output raster dataset’s itemId and image service URL.
{
"paramName": "outputCollection",
"dataType": "GPString",
"value": {
"itemId": "f121390b85ef419790479fc75b493efd",
"url": " https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}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://<raster analysis tools url>/GenerateRasterCollection/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>/GenerateRasterCollection/jobs/<jobId>/results/outputCollection