FRAMES | NO FRAMES Description | Parameters | Examples | Response
Export Image (Operation)

This is an archive of a previous version of the ArcGIS REST API. The current version can be found at http://resources.arcgis.com/en/help/arcgis-rest-api/

URL http://<imageservice-url>/exportImage
Parent Resource Image Service

Description

The export image operation is performed on an image service resource. The result of this operation is an image resource. This resource provides information about the exported image, such as its URL, its width and height, and extent.

Apart from the usual response formats of html and json, users can also request a format called image while performing this operation. When users perform an export with the format of image, the server responds by directly streaming the image bytes to the client. With this approach you don't get any information associated with the exported image besides the actual image.

Users can provide arguments to the export image operation as query parameters. These parameters include the request extent, size information, interpolation, pixel type, and so on. The parameter details are provided in the parameters table below.

Parameters

Parameter Details
f Description: The response format. The default response format is html. If the format is image, the image bytes are directly streamed to the client.

Values: html | json | image | kmz
bbox Description: The extent (bounding box) of the exported image. Unless the bboxSR parameter has been specified, the bbox is assumed to be in the spatial reference of the image service.

Syntax: <xmin>, <ymin>, <xmax>, <ymax>

Example: bbox=-104,35.6,-94.32,41


The bboxcoordinates should always use a period as the decimal separator even in countries where traditionally a comma is used.
size Description: The size (width * height) of the exported image in pixels. If the size is not specified, an image with a default size of 400 * 400 will be exported.

Syntax: <width>, <height>

Examplesize=600,550
imageSR Description: The well-known ID of the spatial reference of the exported image. If the imageSR is not specified, the image will be exported in the spatial reference of the map.
bboxSR Description: The well-known ID of the spatial reference of the bbox. If the bboxSR is not specified, the bbox is assumed to be in the spatial reference of the map.
format Description: The format of the exported image. The default format is png.

Values: png | png8 | png24 | jpg | bmp | gif
pixelType The pixel type, also known as data type, pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point. Integers are whole numbers, whereas floating points have decimals.

Values: C128 | C64 | F32 | F64 | S16 | S32 | S8 | U1 | U16 | U2 | U32 | U4 | U8 | UNKNOWN
noData The pixel value representing no information.

ExamplenoData=0
interpolation The resampling process of extrapolating the pixel values while transforming the raster dataset when it undergoes warping or when it changes coordinate space.

Values: RSP_BilinearInterpolation | RSP_CubicConvolution | RSP_Majority | RSP_NearestNeighbor
compressionQuality Controls how much loss the image will be subjected to by the compression algorithm. Valid value ranges of compression quality are from 0 to 100.

ExamplecompressionQuality=75
bandIds If there are multiple bands, you can specify a single band to export, or you can change the band combination (red, green, blue) by specifying the band number.

ExamplebandIds=2,1,3
mosaicProperties Controls what mosaic operation will be used to create the displayed raster from an image service. MosaicProperties is an XML formatted string.

Examples

<MosaicMethod>Center</MosaicMethod>

<MosaicMethod>ByAttribute</MosaicMethod> <TileOrderField>Month</TileOrderField> <TileOrderBase>6</TileOrderBase>

viewpointProperties The view point properties determine the desired viewing angle of a theoretical observer and subsequently the ordering of rasters in a given data frame extent. ViewpointProperties is an XML formatted string.

Example

<ViewPointDefShiftX>0</ViewPointDefShiftX> <ViewPointDefShiftY>0</ViewPointDefShiftY> <ViewPointX>4489898.428</ViewPointX> <ViewPointY>5478905.02941413</ViewPointY>

Example Usage

Example 1: Export an image with the bounding box [[-117, 34] - [-116, 35]] in WGS 84 (4326).

http://myserver/arcgis/rest/services/MyImage/ImageServer/exportImage?bbox=-117,34,-116,35&bboxSR=4326

Example 2: Export the image similar to Example 1 but request the image in Web Mercator (102113).

http://myserver/arcgis/rest/services/MyImage/ImageServer/exportImage?bbox=-117,34,-116,35&bboxSR=4326&imageSR=102113

JSON Response Syntax

{
"href" : "<href>",
"width" : <width>,
"height" : <height>,
"extent" : {
<envelope>}
}

JSON Response Example

{
"href" : "http://atlantic/arcgisoutput/_ags_map42ef5eae899942a9b564138e184a55c9.png",
"width" : 400,
"height" : 400,
"extent" : {
"xmin" : -109.55, "ymin" : 25.76, "xmax" : -86.39, "ymax" : 49.94,
"spatialReference" : {"wkid" : 4326}
}
}