- URL:
- https://<imageservice-url>/download
- Methods:
GET
- Required Capability:
- Catalog, Download
- Version Introduced:
- 10.0
Description
The download
operation is performed on an image service resource and returns information (the file ID) that can be used to download the raw raster files that are associated with a specified set of rasters in the raster catalog. The file IDs returned by this operation can be used to download individual files using the Raster File resource.
Request parameters
Parameter | Details |
---|---|
| A comma-separated list of raster IDs whose files are to be downloaded. Example
|
| Description: The geometry to apply for clipping. If specified, the selected rasters will be clipped on the server. The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. In addition to the JSON structures, for envelopes, you can specify the geometry with a simple comma-separated syntax. By default, the geometry is assumed to be in the spatial reference of the image service. You can specify a different spatial reference by using the JSON structure syntax for geometries. Syntax
Examples
|
| The type of geometry specified by the Values: |
| The format of the rasters returned. If not specified, the rasters will be in their native format. The format applies when the clip Valid formats include TIFF, Imagine Image, JPEG, NITF, BIL, BSQ, BIP, ENVI, JP2, GIF, BMP, and PNG. Examples
|
| The response format. The default format is Values: |
Example usage
The following is a sample request URL for the download operation that demonstrates downloading rasters in the TIFF output format, clipped to a specified envelope:
https://machine.domain.com/webadaptor/rest/services/ImageServiceName/ImageServer/download?rasterIds=5,6,10,11,12&geometry={"xmin":-1949594.8286481365,
"ymin": 882737.0181116117,"xmax":-1946926.2791246006,"ymax":884828.2021675818,"spatialReference":{"wkid":102009}}&geometryType=esriGeometryEnvelope&format=TIFF&f=html
JSON Response syntax
{
"rasterFiles": [ //the list of files that make up the rasters to be downloaded
{ //info pertaining to a single file
//use this ID to download the file using the Raster File resource
"id": "<fileId1>",
"size": <fileSize1>,
//an array of IDs of rasters that include this file
"rasterIds": [ <rasterId11>, <rasterId12> ]
},
{
"id": "<fileId2>",
"size": <fileSize2>,
"rasterIds": [ <rasterId21>, <rasterId22> ]
}
]
}
JSON Response example
{
"rasterFiles": [
{
"id": "https://servername/arcgisoutput/_ags_507978500/md/data/2w21w_5_s6c.tif",
"size": 390431,
"rasterIds": [
5
]
},
{
"id": "https://servername/arcgisoutput/_ags_507978500/md/data/2w21w_5_s6c.tfw",
"size": 90,
"rasterIds": [
5
]
},
{
"id": "https://servername/data/2w22w.jpg",
"size": 1913965,
"rasterIds": [
6
]
},
{
"id": "https://servername/data/2w22w.aux",
"size": 18049,
"rasterIds": [
6
]
},
{
"id": "https://servername/data/2w22w.rrd",
"size": 2339130,
"rasterIds": [
6
]
}
]
}