Copy Raster

URL:
https://<rasteranalysistools-url>/CopyRaster
Methods:
GET
Version Introduced:
10.6.1

Description

Copy Raster diagram

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

ParameterDetails

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:

1
2
3
4
5
6
7
8
9
10
//Portal Item ID
{"itemId": <portal item id>}

//Image Service URL
{"url": <image service url}

//Service Properties
{"serviceProperties":{"name":"testrasteranalysis",
  "serviceUrl":"https://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId", "sdfwerfbd3ec25584d0d8f4",: }}

outputName

(Required)

The location where the service will generate the output raster.

Syntax: A JSON object describes the output raster.

Example:

1
2
3
4
5
6
7
8
9
10
//Portal Item ID
{"itemId": <portal item id>}

//Image Service URL
{"url": <image service url}

//Service Properties
{"serviceProperties":{"name":"testrasteranalysis",
  "serviceUrl":"https://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId", "sdfwerfbd3ec25584d0d8f4",: }}

outputCellsize

The JSON object of the output raster call size.

1
2
3
4
{
  "x": <numeric number>,
  "y": <numeric number>
}

resamplingMethod

Defines the types of resampling methods you want to use to resample the uploaded image.

Values: Nearest | Bilinear | Cubic | Majority

1
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.

1
2
3
4
5
6
7
{
  "ClippingGeometry":{
     "rings": [[[470614.2631, 8872849.41], [470614.2613, 8920205.3724], [532307.3518, 8920205.3725], [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

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.

1
{"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:

1
2
3
4
{
"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:

1
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:

1
https://<raster analysis tools url>/CopyRaster/jobs/<jobId>/results/outRaster

Example usage

The following is a sample request URL for CopyRaster :

1
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/CopyRaster/submitJob

JSON Request example

1
2
3
4
5
6
7
8
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.

1
2
3
4
5
6
7
8
{
    "paramName": "outRaster",
    "dataType": "GPString",
    "value": {
        "itemId": "f121390b85ef419790479fc75b493efd",
        "url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
    }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close