FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<imageservice-url>/download |
Parent Resource | Image Service |
---|---|
Required Capability | Catalog,Download |
The download rasters operation is performed on an image service resource.
The download raster operation 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 id
s returned by this operation can be used to download individual files
using the Raster File resource.
You can provide arguments to the download rasters operation as query parameters defined in the parameters table below.
Parameter | Details |
---|---|
f | Description: The
response format. The default response format is html. Values: html | json |
rasterIds |
Description:
A comma separated list of raster IDs whose files are to be downloaded
Example: rasterIds=37, 462 |
geometry |
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
simpler 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:
|
geometryType |
Description:
The type of geometry specified by the geometry
parameter. The geometry type can be an envelope or polygon. The default geometry type is an envelope.
Values: esriGeometryPolygon | esriGeometryEnvelope
|
format |
Description:
The format of the rasters returned. If not specified, the rasters will be in their native format.
The format applies when the clip geometry is also specified and the format will be honored only when the raster is clipped. To force download operation to convert source images to a different format, append ":Conversion" after format string.
Valid formats include: TIFF, Imagine Image, JPEG, BIL, BSQ, BIP, ENVI, JP2, GIF, BMP,PNG Example: format=TIFF, format=JP2:Conversion
|
Example 1: Download raster in TIFF output format, clipped to a specified envelope.
http://servername/ArcGIS/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
{ "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> ] } ] }
{ "rasterFiles" : [ { "id" : "http://servername/arcgisoutput/_ags_507978500/md/data/2w21w_5_s6c.tif", "size" : 390431, "rasterIds" : [ 5 ] }, { "id" : "http://servername/arcgisoutput/_ags_507978500/md/data/2w21w_5_s6c.tfw", "size" : 90, "rasterIds" : [ 5 ] }, { "id" : "http://servername/data/2w22w.jpg", "size" : 1913965, "rasterIds" : [ 6 ] }, { "id" : "http://servername/data/2w22w.aux", "size" : 18049, "rasterIds" : [ 6 ] }, { "id" : "http://servername/data/2w22w.rrd", "size" : 2339130, "rasterIds" : [ 6 ] } ] }