Copy Raster

Copy Raster

The Copy Raster 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 URL

http://<analysis url>/CopyRaster/submitJob? inputRaster={"itemId": 
"1780d648db3545bba8661ad98df824a4"}& outputRaster={“itemId": 
"04180233981a4b978755d854687e149e"}& outputCellsize={"x": 15, "y": 15}& 
resamplingMethod=BILINEAR&clipSetting={"rings" : [[[470614.2631, 8872849.41], 
[470614.2631, 8920205.3724], [532307.3518, 8920205.3724], [532307.3518, 8872849.41], 
[470614.2631, 8872849.41]]],"spatialReference" : {"wkid" : 32628}}

Request parameters

Parameter

Description

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:

{"itemId": <portal item id>}
{"url": <image service url}
{"serviceProperties":{"name":"testrasteranalysis",
  "serviceUrl":"http://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId", "sdfwerfbd3ec25584d0d8f4",: }}

outputRaster

(Required)

The location where the service will generate the output raster.

Syntax: A JSON object describes the output raster.

Example:

{"itemId": <portal item id>}
{"url": <image service url}
{"serviceProperties":{"name":"testrasteranalysis",
  "serviceUrl":"http://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId", "sdfwerfbd3ec25584d0d8f4",: }}

outputCellsize

The JSON object of the output raster cell size.

Example: {"x": <numeric number>, "y": <numeric number>}

resamplingMethod

Defines the type of resampling method you want to use to resample the image being uploaded.

Values: Nearest | Bilinear | Cubic | Majority

Example: resamplingMethod=Bilinear

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.

Example:

Example: {"ClippingGeometry": 
{ "rings" : [[[470614.2631, 8872849.41], 
[470614.2631, 8920205.3724], [532307.3518, 
8920205.3724], [532307.3518, 8872849.41], 
[470614.2631, 8872849.41]]], "spatialReference"
 : {"wkid" : 32628}}, "extent": { "xmin" : 
470614.263139, "ymin" : 8872849.409968, 
"xmax" : 532307.351827, "ymax" : 
8920205.372412, "spatialReference" : 
{"wkid" : 32628}}}

context

Contains additional settings that affect task execution.

For CopyRaster, it contains one setting, Output Spatial Reference (outSR), where the output will be projected into the output spatial reference.

Syntax: { "outSR" : {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 the jobId to periodically check the status of the job and messages as described in Checking job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

http://<analysis url>/CopyRaster/jobs/<jobId>

Accessing results

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:

http://<raster analysis url>/CopyRaster/jobs/<jobId>/results/outRaster?token=<your token>&f=json

Parameter

Description

outRaster

The output raster item ID and URL.

Example: {"url": "http://<raster analysis url>/CopyRaster/jobs/<jobId>/results/outRaster"}

The result has properties for parameter name, data type, and value. The content of the value is always the output raster dataset itemId and the image service url.

{
 "paramName": "outputRaster",
 "dataType": "GPString",
 "value": {
  "itemId": "f121390b85ef419790479fc75b493efd", 
  "url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
 } 
}

Related topics

9/13/2017