- URL:https://<rasteranalysistools-url>/CopyRaster
- Version Introduced:10.6.1
Description
The CopyRaster task takes single raster layer input and generates the output image using parallel processing.
The input raster dataset can be clipped, resampled, and reprojected based on the setting.
Request parameters
Parameter | Details |
---|---|
inputRaster (Required) | The portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be copied to another location. Syntax: A string describes the input raster. Example: |
outputRaster (Required) | The location where the service will generate the output raster. Syntax: A JSON object describes the output raster. Example: |
outputCellsize | The JSON object of the output raster call size.
|
resamplingMethod | Defines the types of resampling methods you want to use to resample the uploaded image. Values: Nearest | Bilinear | Cubic | Majority
|
clipSetting | The JSON geometry object used to clip the input image. The clipping geometry object may contain the shape description, extent, and the clip type.
|
context | Additional settings that affect task execution. This operation contains only one additional setting, Output Spatial Reference (outSR). This setting determines where the output will be projected into the output spatial reference.
|
f | The response format. The default response format is html. Values: html | 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 jobId to periodically review the status of the job and messages as described in Checking job status. Once the job has successfully completed, use jobId to retrieve the results. To track the status, you can make a request of the following form:
https://<raster analysis tools url>/CopyRaster/jobs/<jobId>
When the status of the job request is esriJobSucceeded, you can access the results of the analysis by making a request of the following form:
https://<raster analysis tools url>/CopyRaster/jobs/<jobId>/results/outRaster
Example usage
The following is a sample request URL for CopyRaster:
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/CopyRaster/submitJob
JSON Request example
inputRaster={"itemId": "1780d648db3545bba8661ad98df824a4"}&
outputRaster={"itemId": "04180233981a4b978755d854687e149e"}&
outputCellsize={"x": 15, "y": 15,}&
resamplingMethod=BILINEAR&
clipSetting={
"rings": [[[470614.2631, 8872849.41],[470614.2367, 8920205.3724],[532307.3518, 8920205.3724],[532307.3518, 8872849.41],[470614.2631, 8872849.41]]],
"spatialReference": {"wkid": 32628}
}
JSON Response example
The response returns the outRaster output parameter, which has properties for parameter name, data type, and value. The content of value is always the output raster dataset itemId and the image service URL.
{
"paramName": "outRaster",
"dataType": "GPString",
"value": {
"itemId": "f121390b85ef419790479fc75b493efd",
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}