Skip To Content
ArcGIS Developer
Dashboard

Download Raster

Description

Download Raster diagram

The DownloadRaster task is used to download an image or partial image at a designated resolution. The input image service must be configured to allow pixel data download.

Request parameters

ParameterDetails
inputImageLayer

(Required)

The input image, designated as a Portal Item ID, Image Service URL, cloud raster dataset, or shared raster dataset.

At least one type of input must be provided in the JSON object. If multiple input types are available in the same JSON dictionary, the itemId has priority.

The service tool supports downloading from multiple imagery layers in one request.

Syntax: JSON object describes the input from raster.


{"itemId": <portal item id>} 
{“url”: <image service url>}
{“itemIds”: [<portal item id>, <portal item id>]}
{“urls”: [<image service url>, <image service url>]}
clipSetting

(Required)

The JSON geometry object used to clip the input image. The clipping geometry object can contain the shape description, extent, and clip type.

Syntax: A JSON object supports three case sensitive keys: itemId, url, and uri.

Example:


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

Contains settings that affect task execution and results. This task has the following settings:

  • ResamplingMethod (resamplingMethod)—Choose the resampling method to use when creating the raster dataset for download.
    • NEAREST—Uses the value of the closest cell to assign a value to the output cell when resampling. This is the default.
    • BILINEAR—Determines the new value of a cell based on a weighted distance average of the four nearest input cell centers.
    • CUBIC—Determines the new value of a cell based on fitting a smooth curve through the 16 nearest input cell centers.

Example:


"resamplingMethod": "BILINEAR" or
"resamplingMethod": "NEAREST" or 
"resamplingMethod": "CUBIC"
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 Check 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://<RasterUtilities service url>/DownloadRaster/jobs/<jobId>

Access 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 utilities url>/DownloadRaster/jobs/<jobId>/results/outputRaster?token=<your token>

ParameterDescription
outputRaster

The output raster download link.

Example:


{"url": "https://<raster utilities service url>/DownloadRaster/jobs/<jobId>/results/outputRaster"}

The result 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": "outputRaster",
  "dataType": "GPMultiValue:GPRasterDataLayer",
  "value": [
    {
      "url": "https://<server url>/server/rest/directories/arcgisjobs/utilities/rasterutilities_gpserver/j21fcd7f883fa448c815a076e3b1825fb/scratch/ortho1.tif",
      "format": "tif"
    }
  ]
}

Related topics