Raster Image

URL:
https://<rastercatalogitem-url>/image
Methods:
GET
Required Capability:
Image, Catalog
Version Introduced:
10.0

Description

The image resource returns a composite image for a single raster catalog item. You can use this resource for generating dynamic images based on a single catalog item. This resource provides information about the exported image, such as its URL, width and height, and extent.

Apart from the usual response formats of html and json, you can also request a format named image for the image. When you specify image as the format, the server responds by directly streaming the image bytes to the client. With this approach, you don't get any information associated with the image other than the actual image.

Request parameters

ParameterDetails

bbox

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

Use dark colors for code blocksCopy
1
bbox=<xmin>, <ymin>, <xmax>, <ymax>

Example

Use dark colors for code blocksCopy
1
bbox=-104,35.6,-94.32,41

size

The size (width and height) of the exported image in pixels. If the size is not specified, an image with a default size of 400x400 will be exported.

Syntax

Use dark colors for code blocksCopy
1
size=<width>, <height>

Example

Use dark colors for code blocksCopy
1
size=600,550

imageSR

The spatial reference of the exported image. The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object. If the imageSR is not specified, the image will be exported in the spatial reference of the image service.

bboxSR

The spatial reference of the bbox. The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object. If the bboxSR is not specified, the bbox is assumed to be in the spatial reference of the image service.

format

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, that pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point. Integers are whole numbers; 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.

Example

Use dark colors for code blocksCopy
1
noData=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.

Example

Use dark colors for code blocksCopy
1
compressionQuality=75

f

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

Example usage

The following is a sample request URL used to return a raster image (response format set as html ) for raster ID 8:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/Portland/CascadeLandsat/ImageServer/8/image?bbox=378501.375,4825171.125,634687.875,5051974.125&bandIds=0,1,2

The following is a sample request URL used to return a raster image (response format set as image) for raster ID 8 in a png8 format:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/Portland/CascadeLandsat/ImageServer/8/image?bbox=378501.375,4825171.125,634687.875,5051974.125&bandIds=0,1,2&f=image&format=png8

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
  "href": "<href>",
  "width": <width>,
  "height": <height>,
  "extent": <envelope>
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  "href" : "https://machine.domain.com/arcgisoutput/_ags_336971124.png",
  "width" : 400,
  "height" : 400,
  "extent" : {
    "xmin" : 7585040,
    "ymin" : 695086,
    "xmax" : 7590710,
    "ymax" : 700756,
    "spatialReference" : {
      "wkt" : "PROJCS[\"NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601\",GEOGCS[\"GCS_North_American_1983_HARN\",DATUM[\"D_unknown\",SPHEROID[\"North_American_1983_HARN\",6378137.0,298.257222101]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Lambert_Conformal_Conic\"],PARAMETER[\"false_easting\",8202099.737532808],PARAMETER[\"false_northing\",0.0],PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"standard_parallel_1\",44.33333333333334],PARAMETER[\"standard_parallel_2\",46.0],PARAMETER[\"latitude_of_origin\",43.66666666666666],UNIT[\"Foot\",0.3048]]"
    }
  },
  "scale" : 0
}

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