Raster function objects
Index
Well-known functions are as follows:
- ArgStatistics | Arithmetic | Aspect
- BandArithmetic
- CCDC | Classify | Clip | Colormap | ColormapToRGB | Complex |CompositeBand | ComputeChange | ContrastBrightness | Convolution | Curvature
- DetectChange
- ElevationVoidFill | ExtractBand
- Geometric | Grayscale
- Identity
- Hillshade
- Local
- Mask | MLClassify | MultidimensionalRaster | MultidimensionalFilter
- NDVI | Pansharpening | ProcessRasterCollection
- RasterCalculator | Recast | Remap | Resample
- SegmentMeanShift | ShadedRelief | Slope | Speckle | SpectralConversion | SpectralUnmixing | Statistics | StatisticsHistogram | Stretch
- TasseledCap | Threshold | TransposeBits | Trend | TrendAnalysis | TrendToRGB
- UnitConversion
- VectorField | VectorFieldRenderer
- WeightedOverlay | WeightedSum
Raster function templates are as follows:
Overview
The image service has multiple operations that support the renderingRule parameter. A rendering rule defines how the requested image should be rendered or processed. It consists of a raster function, associated arguments, output pixel type, and variable name. The raster function name identifies the processing or rendering to be performed, the associated arguments provide parameter name value pairs used by the processing, and the output pixel type defines the output image's pixel type. Among the raster function arguments, there is one or more arguments that take rasters as input. The variableName operation identifies the argument name that takes raster inputs. The following is the syntax for rendering rules:
{
"rasterFunction": "<rasterFunctionName>",
"rasterFunctionArguments": {
"argument1": <value1>,
"argument2": <value2>,
"argumentn": <valuen>
},
"outputPixelType": "<outputPixelType>", //new at 10.2, default is UNKNOWN. C128 | C64 | F32 | F64 | S16 | S32 | S8 | U1 | U16 | U2 | U32 | U4 | U8 | UNKNOWN
"variableName": "<variableName>" //optional for well known functions, default is "Raster" for raster function templates.
}
See Using Rasters in Rendering Rules for more information on how to use raster inputs and variableName.
The image service has a few well-known raster functions that do not need to be preconfigured with the service. These well-known functions include the following:
- ArgStatistics
- Arithmetic
- Aspect
- BandArithmetic
- Classify
- Clip
- Colormap
- ColormapToRGB
- Complex
- CompositeBand
- ContrastBrightness
- Convolution
- Curvature
- ElevationVoidFill
- ExtractBand
- Geometric
- Greyscale
- Identity
- Hillshade
- Local
- Mask
- MLClassify
- NDVI
- Pansharpening
- RasterCalculator
- Recast
- Remap
- Resample
- SegmentMeanShift
- ShadedRelief
- Slope
- Statistics
- StatisticsHistogram
- Stretch
- TasseledCap
- Threshold
- TransposeBits
- UnitConversion
- Vectorfield
- VectorFieldRenderer
- WeightedSum
- WeightedOverlay
At 10.1 and later, a client can invoke a raster function template that is preconfigured on the server side along with the service. A raster function template defines a processing chain composed of one or more raster functions, including customized raster functions that are extended based on ArcObjects. Information about these raster function templates is available through the RasterFunctionInfos property on the image service root resource page. A client can omit rasterFunctionArguments, and take the default configuration in the raster function template, or overwrite them by specifying argument parameters (argument names and value types are defined by the author of each raster function template and are not discoverable through REST).
ArcGIS supports numerous raster functions. Not all raster functions in ArcGIS are directly exposed as well-known functions, but they can be used in service-defined raster function templates. For more information, see Server-side raster functions and What are the functions used by a raster or mosaic dataset.
At 10.2 and later, a client can define a raster function template by chaining multiple well-known raster functions and can also specify output pixel types; this does not apply to service-defined raster function templates.
This topic describes the well-known raster functions supported by the REST API, as well as raster function template syntax and examples: either service defined or client defined.
At 10.2.1, in addition to well-known functions, service-defined raster function templates can also be used in client-defined raster function templates.
At 10.3, service-defined raster function templates can group rasters using a designated attribute and resolve rasters using a tag. For example, a fish habitat suitability model may need multiple rasters from different variables, such as water temperature, salinity, and so on. The service publisher can define a raster function template that groups rasters by an attribute, for example, an attribute representing a particular slice in time and depth. Then they can resolve these rasters in a group using a tagged attribute, for example tag or variableName. The client can get this information from Raster Function Infos; the grouping and tagging are done on the server side, so the client can simply invoke the template.
At 10.5.1, Hillshade supports multidirectional and traditional hillshades.
At 10.9, all raster functions that support multiple multidimensional raster inputs also support the following two multidimensional arguments:
- MatchVariable— When this argument is set to true, the raster function will only proceed if the variables in the two or more input multidimensional rasters have the same name. This is the default. When it is set to false, the input multidimensional rasters can have variables with different names.
- UnionDimension— When this argument is set to true, the raster function will only proceed if the dimensions in the two or more input multidimensional rasters have the same name. This is the default. When it is set to false, the dimensions do not have to have matching names, and the result will be the union of the dimensions. For example, if you add two multidimensional rasters that both have an ocean temperature variable named "temp", but one measure along dimension Time and one measure along dimension Depth, the result will be a multidimensional raster with both Time and Depth dimensions where the temperature variable has been added together for each combination of dimensions.
"rasterFunction": "ArgStatistics"
Introduced at 10.3, the ArgStatistics function produces an output with a pixel value that represents a statistical metric from all bands of input rasters. The statistics can be the band index of the maximum, minimum, or median value, or the duration (number of bands) between a minimum and maximum value. For more information, see ArgStatistics function.
The arguments for the ArgStatistics function are as follows:
{
"rasterFunction": "ArgStatistics",
"rasterFunctionArguments": {
"ArgStatisticsType": <ArgStatisticsType>, //int 0=maximum, 1= minimum, 2=median, 3=duration
"MinValue": <MinValue>, //double, required if the type is duration
"MaxValue": <MaxValue>, //double, required if the type is duration
"UndefinedClass": <UndefinedClass>, //int, required if the type is maximum or minimum
"Rasters": [ //array of rasters.
<raster1>,
<raster2>,
<raster3>
],
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
The example demonstrates how to calculate the duration between 0.15 to 1 (the number of continuous bands that meet the condition):
Calculate duration between 0.15 to 1 (number of continuous bands that meet the condition).
{
"rasterFunction": "ArgStatistics",
"rasterFunctionArguments": {
"ArgStatisticsType": 3,
"MinValue": 0.15,
"MaxValue": 1,
"UndefinedClass": 100
"Raster": "$$"
}
}
"rasterFunction": "Arithmetic"
Introduced at 10.2.1, the Arithmetic function performs an arithmetic operation between two rasters or a raster and a scalar, and vice versa. For more information, see the Arithmetic function.
The arguments for the Arithmetic function are as follows:
{
"rasterFunction": "Arithmetic",
"rasterFunctionArguments": {
"Raster": <Raster>, //raster, or scalars(space delimited string, or array of double)
"Raster2": <Raster2>, //raster, or scalars(space delimited string, or array of double)
"Operation": <Operation>, //int 1=esriRasterPlus, 2=esriRasterMinus, 3=esriRasterMultiply, 4=esriRasterDivide, 5=esriRasterPower, 6=esriRasterMode
"ExtentType": <ExtentType>, //int; optional; default 0; 0=esriExtentFirstOf, 1=esriExtentIntersectionOf, 2=esriExtentUnionOf, 3=esriExtentLastOf
"CellsizeType": <CellsizeType>, //int; optional; default 0; 0=esriCellsizeFirstOf, 1=esriCellsizeMinOf, 2=esriCellsizeMaxOf, 3=esriCellsizeMeanOf, 4=esriCellsizeLastOf
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
}
Example
Below is an example that demonstrates the esriRasterMinus (W) operation:
{
"rasterFunction": "Arithmetic",
"rasterFunctionArguments": {
"Raster" : "$$",
"Raster2": "100",
"Operation" : 2
}
}
"rasterFunction": "Aspect"
Aspect identifies the downslope direction of the maximum rate of change in value from each cell to its neighbors. Aspect can be thought of as the slope direction. The values of the output raster will be the compass direction of the aspect. For more information, see Aspect function and How Aspect works.
The Aspect function takes no arguments.
{
"rasterFunction": "Aspect"
}
"rasterFunction": "BandArithmetic"
Introduced at 10.1, the BandArithmetic function performs an arithmetic operation on the bands of a raster dataset. For more information, see Band Arithmetic function.
The arguments for the BandArithmetic function are as follows:
{
"rasterFunction": "BandArithmetic",
"rasterFunctionArguments": {
"Method": <Method>, //int (0 = UserDefined, 1 = NDVI, 2 = SAVI, 3 = TSAVI, 4 = MSAVI, 5 = GEMI, 6 = PVI, 7 = GVITM, 8 = Sultan, 9 = VARI)
"BandIndexes": "<BandIndexes>", //string e.g. (B3 - B1 / B3 + B1)
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
The equations and corresponding BandIndexes are listed below for each method. In all equations, NIR equals pixel values from the near-infrared band, and Red equals pixel values from the red band.
- Normalized Difference Vegetation Index
- NDVI = ((NIR - Red)/(NIR + Red))
- BandIndexes: "NIR Red", e.g., "4 3"
- Reference: Pinty, B. and Verstraete, M. M. 1992, "GEMI: a non-linear index to monitor global vegetation from satellites," Plant Ecology, Vol. 101, 15-20.
- Soil-Adjusted Vegetation Index
- SAVI = ((NIR - Red) / (NIR + Red + L)) x (1 + L)
- where L represents amount of green vegetative cover, e.g., 0.5
- "BandIndexes": "NIR Red L", for example, "4 3 0.33"
- Reference: Huete, A. R., 1988, "A soil-adjusted vegetation index (SAVI)," Remote Sensing of Environment, Vol 25, 295-309.
- Transformed Soil Adjusted Vegetation Index
- TSAVI = (s(NIR-s*Red-a))/(a*NIR+Red-a*s+X*(1+s^2))
- where a = the soil line intercept, s = the soil line slope, X = an adjustment factor that is set to minimize soil noise
- "BandIndexes": "NIR Red s a X", e.g., "4 3 0.33 0.50 1.50"
- Reference: Baret, F. and G. Guyot, 1991, "Potentials and limits of vegetation indices for LAI and APAR assessment," Remote Sensing of Environment, Vol. 35, 161-173.
- Global Environmental Monitoring Index
- GEMI = eta*(1-0.25*eta)-((Red-0.125)/(1-Red))
- where eta = (2*(NIR^2-Red^2)+1.5*NIR+0.5*Red)/(NIR+Red+0.5)
- "BandIndexes":"NIR Red", e.g., "4 3"
- Reference: Pinty, B. and Verstraete, M. M. 1992, "GEMI: a non-linear index to monitor global vegetation from satellites," Plant Ecology, Vol. 101, 15-20,
- Green Vegetation Index - Landsat TM
- GVITM = -0.2848*Band1-0.2435*Band2-0.5436*Band3+0.7243*Band4+0.0840*Band5-1.1800*Band7
- "BandIndexes":"Band1 Band2 Band3 Band4 Band5 Band7", e.g., "1 2 3 4 5 6"
- Reference: Todd, S. W., R. M. Hoffer, and D. G. Milchunas, 1998, "Biomass estimation on grazed and ungrazed rangelands using spectral indices," International Journal of Remote Sensing, Vol. 19, No. 3, 427-438.
- Modified Soil Adjusted Vegetation Index
- MSAVI2 = (1/2)*(2(NIR+1)-sqrt((2*NIR+1)^2-8(NIR-Red)))
- BandIndexes: "NIR Red", e.g., "4 3"
- Reference: Qi, J. et al., 1994, "A modified soil vegetation adjusted index, " Remote Sensing of Environment, Vol. 48, No. 2, 119-126.
- Perpendicular Vegetation Index
- PVI = (NIR-a*Red-b)/(sqrt(1+a^2))
- where a = slope of the soil line, b = gradient of the soil line
- BandIndexes: "NIR Red a b", e.g., "4 3 0.3 0.5"
- Sultan's Formula (transform to 3 band 8 bit image)
- Band 1 = (Band5 / Band6) x 100
- Band 2 = (Band5 / Band1) x 100
- Band 3 = (Band3 / Band4) x (Band5 / Band4) x 100
- "BandIndexes":"Band1 Band2 Band3 Band4 Band5 Band6", e.g., "1 2 3 4 5 6"
- Visible Atmospherically Resistant Index
- VARI = (Green - Red)/(Green + Red - Blue)
- BandIndexes: "Red Green Blue", e.g., "3 2 1"
- Reference: Anatoly A. Gitelson, Yoram J. Kaufman, Robert Stark, and Don Rundquist, 2002, "Novel algorithms for remote estimation of vegetation fraction," Remote Sensing of Environment, Vol. 80, 76-87.
- User Defined
- Use a single-line algebraic formula to create a single-band output. The supported operators are -, +, /, *, and unary -.
- To identify the bands, prepend the band number with a B or b. For example: "BandIndexes":"(B1 + B2) / (B3 * B5)"
Example
{
"rasterFunction": "BandArithmetic",
"rasterFunctionArguments": {
"Method": 0,
"BandIndexes": "(B3 - B1 / B3 + B1)",
"Raster": <raster> //optional, default is the image service
},
"variableName": "Raster"
}
"rasterFunction": "CCDC"
Introduced at 10.81, the CCDC evaluates changes in pixel values over time using the Continuous Change Detection and Classification (CCDC) algorithm and generates a multidimensional raster containing the model results. For more information, see the CCDC Analysis function.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the CCDC function are as follows:
{
"rasterFunction": "CCDC",
"rasterFunctionArguments": {
"Raster": <Raster>, //the input raster
"BandIDs": [
<Band1>,
<band2>,
…
],//int, optional
"TmaskBandIDs": [
<Band2>,
<Band4>,
…
], //int, optional
"ChiSquareProb": <ChiSquareProb>, //int, optional
"MinNumberAnomaly": <MinNumberAnomaly>, //int, optional
"UpdatingFrequency": <UpdatingFrequenc> //int, optional
}
}
Example
{
"rasterFunction": CCDC",
"rasterFunctionArguments": {
"Raster": "landset.crf",
"BandIDs": [
1,
2
]
}
}
"rasterFunction": "Classify"
Introduced at 10.3, the Classify function classifies a segmented raster to a categorical raster. For more information, see the Classify function.

At 10.5, you must license your ArcGIS Server as ArcGIS Server 10.9.1 Enterprise Advanced or ArcGIS Image Server to use this resource. At versions prior to 10.5, the hosting ArcGIS Server needs to have a Spatial Analyst license.
The arguments for the Classify function are as follows:
{
"rasterFunction": "Classify",
"rasterFunctionArguments": {
"ClassifierDefinition": <Definition_json>, //a json object that defines the classifier parameters.
"Raster": <Raster>, //the input raster, usually this is the service
"Raster2": <Raster2>, //optional. additional input raster which may contain the segment information. If provided, pixels in each segment will get same class assignments.
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
Below is an example that demonstrates how to classify a segmented image using the maximum likelihood classifier:
{
"rasterFunction": "Classify",
"rasterFunctionArguments": {
"ClassifierDefinition": {
"EsriClassifierDefinitionFile": 0,
"FileVersion": 1,
"NumberDefinitions": 1,
"Definitions": [
{
"Classifier": "MaximumLikelihood",
"NumberClasses": 2,
"RasterIsSegmented": false,
"NumberBands": 3,
"Classes": [
{
"ClassValue": 1,
"ClassName": "Vegetation",
"Red": 230,
"Green": 0,
"Blue": 0,
"Count": 546,
"Means": [
244.9359,
14.88278,
15.21978
],
"Covariances": [
[
10.26146,
0.1390063,
0.1074951
],
[
0.1390063,
10.31593,
1.207584E-04
],
[
0.1074951,
1.207584E-04,
10.19345
]
]
},
{
"ClassValue": 2,
"ClassName": "Water",
"Red": 0,
"Green": 77,
"Blue": 168,
"Count": 716,
"Means": [
15.05587,
15.01257,
244.9567
],
"Covariances": [
[
10.18124,
0.1152196,
0.2789551
],
[
0.1152196,
10.02638,
-0.3583943
],
[
0.2789551,
-0.3583943,
10.11684
]
]
}
]
}
]
}
}
}
"rasterFunction": "Clip"
Introduced at 10.1, the Clip function clips a raster using a rectangular shape according to the extents defined, or will clip a raster to the shape of an input polygon feature class. The shape defining the clip can include the extent of the raster or an area within the raster. For more information, see Clip function.
The arguments for the Clip function are as follows:
{
"rasterFunction": "Clip",
"rasterFunctionArguments": {
"ClippingGeometry": <geometry>, //a polygon or envelope
"ClippingType": <clippingType>, //int (1= clippingOutside, 2=clippingInside), use 1 to keep image inside of the geometry
"Raster": <raster> //optional, default is the image service
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "Clip",
"rasterFunctionArguments": {
"ClippingGeometry": {
"rings": [
[
[
10,
10
],
[
9,
11
],
[
10,
12
],
[
11,
11
],
[
12,
10
],
[
10,
10
]
]
],
"spatialReference": {
"wkid": 4326
}
},
"extent": {
"xmin": 10,
"ymin": 10,
"xmax": 12,
"ymax": 12,
"spatialReference": {
"wkid": 4326
}
},
"ClippingType": 1
},
"variableName": "Raster"
}
"rasterFunction": "Colormap"
Introduced at 10.6, the Colormap function transforms the pixel values to display the raster data as a red, green, blue (RGB) color image, based on specific colors in a color map or a color range defined in a color ramp. For more information, see Colormap function. Display raster data using a predefined ColorrampName or a customized Colorramp object. Several ArcGIS predefined color ramps are provided:

Predefined color ramps graphics and their corresponding names may be viewed from the layer's properties window, in the Symbology tab. The particular color ramp or scheme name is specified in the ColorrampName argument object. For more information about color ramp objects, see color ramp objects.
The arguments for the Colormap function are as follows:
{
"rasterFunction": "Colormap",
"rasterFunctionArguments": {
"ColormapName": "<Random | NDVI | NDVI2 | NDVI3 | Elevation | Gray | Hillshade>",
"Colormap": [
[<value1>, <red1>, <green1>, <blue1>], //[int, int, int, int]
[<value2>, <red2>, <green2>, <blue2>]
],
"ColorrampName": "<Black To White | Yellow To Red | Slope | more…>"
"Colorramp": {color ramp object},
"Raster": <raster>//optional, default is the image service
},
"outputPixelType": "<outputPixelType>",//optional
"variableName": "Raster"
}
Example 1
{
"rasterFunction": "Colormap",
"rasterFunctionArguments": {
"ColormapName": "Random"
},
"variableName": "Raster"
}
Example 2
{
"rasterFunction": "Colormap",
"rasterFunctionArguments": {
"Colormap": [
[1,255,0,0],
[2,0,255,0],
[3,125,25,255],
]
},
"variableName": "Raster"
}
Example 3
{
"rasterFunction": "Colormap",
"rasterFunctionArguments": {
"ColorrampName": "Blue Bright"
},
"variableName": "Raster"
}
Example 4
{
"rasterFunction": "Colormap",
"rasterFunctionArguments": {
"colorramp": {
"type": "multipart",
"colorRamps": [
{
"type": "algorithmic",
"fromColor": [
255,
0,
0,
255
],
"toColor": [
0,
255,
0,
255
],
"algorithm": "esriHSVAlgorithm"
},
{
"type": "algorithmic",
"fromColor": [
155,
34,
78,
255
],
"toColor": [
255,
0,
0,
255
],
"algorithm": "esriCIELabAlgorithm"
}
]
}
}
}
"rasterFunction": "ColormapToRGB"
Introduced at 10.6, the ColormapToRGB function is designed to work with single band image service that has internal colormap. It will convert the image into a three-band 8-bit RGB raster. This function takes no arguments except an input raster. For qualified image service, there are two situations when the ColormapToRGB function is automatically applied: The colormapToRGB property of the image service is set to “true”; or, client asks to export image into jpg or png format. For more information, see Colormap To RGB function.

At 10.6.1, UnmappedAsRandomColor parameter was added with false value by default. If this parameter is set to true and colormap doesn’t specify how a raster pixel value will be mapped into RGB values, it will assign a random RGB color to the pixel.
The arguments for the ColormapToRGB function are as follows:
{
"rasterFunction": "ColormapToRGB",
"rasterFunctionArguments": {
"Raster": <raster>, //optional, default is the image service
"UnmappedAsRandomColor": <true|false>, //new at 10.6.1, boolean, optional, default is false
}
}
"rasterFunction": " ColorspaceConversion"
Introduced at 10.6, the ColorspaceConversion function converts the color model of a three-band unsigned 8-bit image from either the hue, saturation, and value (HSV) to red, green, and blue (RGB) or vice versa. An ExtractBand function and/or a Stretch function are sometimes used for converting the imagery into valid input of ColorspaceConversion function. For more information, see Color Model Conversion function.
The arguments for the ColorspaceConversion function are as follows:
{
"rasterFunction": "ColorspaceConversion",
"rasterFunctionArguments": {
"ConversionType": <int>, //0: convert color model from RGB to HSV; 1: convert color model from HSV to RGB
"Raster": "$$" //optional, default is the image service
}
}
Example
The example below demonstrates how to perform a RGB to HSV color model conversion on input raster.
{
"rasterFunction": "ColorspaceConversion",
"rasterFunctionArguments": {
"ConversionType": 0,
"raster": "$$"
}
}
"rasterFunction": "Complex"
Introduced at 10.6, the Complex function is used when input raster has complex pixel type. It computes magnitude from complex value to convert the pixel type to floating point for each pixel. It takes no argument but an optional input raster. For more information, see Complex function.
The arguments for the Complex function are as follows:
{
"rasterFunction": "Complex",
"rasterFunctionArguments": {
"Raster": <raster> //optional, default is the image service
}
}
"rasterFunction": "CompositeBand"
Introduced at 10.2.1, the CompositeBand function allows you to combine multiple images to form a multiband image. For more information, see Composite Bands function.
The arguments for the CompositeBand function are as follows:
{
"rasterFunction": "CompositeBand",
"rasterFunctionArguments": {
"Rasters": [ //array of rasters
<raster>,
<raster>,
<raster>
]
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
"rasterFunction": "ComputeChange"
Introduced at 10.8.1, the ComputeChange computes changes that occur between categorical or continuous rasters. For more information, see Compute Change function.

This function will only work if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the ComputeChange function are as follows:
{
"rasterFunction": "ComputeChange",
"rasterFunctionArguments": {
"Raster": <Raster>, //the input raster
"Raster2": <Raster2>, //the input raster
"Method": < Method> //int, compute change method, 0 = difference, 1 = relative difference, 2 = categorical
}
}
Example
{
"rasterFunction": "ComputeChange",
"rasterFunctionArguments": {
"Raster": "land2002.tif",
"Raster2": "land2020.tif",
"Method": 0
}
}
"rasterFunction": "ContrastBrightness"
Introduced at 10.2.1, the ContrastBrightness function enhances the appearance of raster data (imagery) by modifying the brightness or contrast within the image. This function works on 8-bit input raster only. For more information, see Contrast and Brightness function.
The arguments for the ContrastBrightness function are as follows:
{
"rasterFunction": "ContrastBrightness",
"rasterFunctionArguments": {
"ContrastOffset": <ContrastOffset>, //double, -100 to 100
"BrightnessOffset": <BrightnessOffset>, //double, -100 to 100
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "ContrastBrightness",
"rasterFunctionArguments": {
"ContrastOffset": 30,
"BrightnessOffset: 10,
"Raster": "$$"
}
}
"rasterFunction": "Convolution"
Introduced at 10.1, the Convolution function performs filtering on the pixel values in an image, which can be used for sharpening an image, blurring an image, detecting edges within an image, or other kernel-based enhancements. For more information, see Convolution function.
The arguments for the Convolution function are as follows:
{
"rasterFunction": "Convolution",
"rasterFunctionArguments": {
"Columns": <Columns>,
"Rows": <Rows>,
"Kernel": [ //an array that has m x n elements
<k11>,
<k12>,
...
]
"Type": <Type>, //int (-1=UserDefined, 0=LineDetectionHorizontal, 1=LineDetectionVertical, 2=LineDetectionLeftDiagonal, 3=LineDetectionRightDiagonal, 4=GradientNorth, 5=GradientWest, 6=GradientEast, 7=GradientSouth, 8=GradientNorthEast, 9=GradientNorthWest, 10=SmoothArithmeticMean, 11=Smoothing3x3, 12=Smoothing5x5, 13=Sharpening3x3, 14=Sharpening5x5, 15=Laplacian3x3, 16=Laplacian5x5, 17=SobelHorizontal, 18=SobelVertical, 19=Sharpen, 20=Sharpen2, 21=PointSpread)
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "Convolution",
"rasterFunctionArguments": {
"Type": 11
},
"outputPixelType": "<outputPixelType>",//optional
"variableName": "Raster"
}
"rasterFunction": "Curvature"
The Curvature function displays the shape or curvature of the slope. A part of a surface can be concave or convex; you can tell that by looking at the curvature value. The curvature is calculated by computing the second derivative of the surface. For more information, see conceptual help on how it works.
The arguments for the Curvature function are as follows:
{
"rasterFunction": "Curvature",
"rasterFunctionArguments": {
"Type": <type>, //0=Standard, 1=Platform, 2=Profile
"ZFactor": <zFactor>, //double
"Raster": <Raster>, //optional, default is the service "$$"
},
"outputPixelType": "<outputPixelType>", //optional
}
Example
{
"rasterFunction": "Curvature",
"rasterFunctionArguments": {
"Type": 0,
"ZFactor": 1
}
}
"rasterFunction": "DetectChange"
Introduced at 10.8.1, the DetectChange generates a raster layer containing pixel change information using the output change analysis raster from the Analyze Changes Using CCDC tool. For more information, see Detect Change Using Change Analysis function.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the DetectChange function are as follows:
{
"rasterFunction": "DetectChange",
"rasterFunctionArguments": {
"Raster": <Raster>, //the input raster
"ChangeType": <ChangeType>, //int, 0=time of latest change, 1=time of earliest change, 2=time of largest, 3=number of changes
"MaxNumberChanges": <MaxNumberChanges> //int
}
}
Example
Below is an example that demonstrates how to detect the time of the latest change.
{
"rasterFunction": "DetectChange",
"rasterFunctionArguments": {
"Raster": "NDVI.crf",
"ChangeType": 0,
"MaxNumberChanges": 1
}
}
"rasterFunction": "ElevationVoidFill"
The ElevationVoidFill function is used to create pixels where holes exist in your elevation. For more information, see conceptual help on how it works.
The arguments for the ElevationVoidFill function are as follows:
{
"rasterFunction": "ElevationVoidFill",
"rasterFunctionArguments": {
"MaxVoidWidth": <MaxVoidWidth> //number. Maximum void width to fill. 0: fill all
"Raster": <Raster>, //optional, default is the service "$$"
},
"outputPixelType": "<outputPixelType>", //optional
}

MaxVoidWidth is used to specify the largest size of a void that you want to fill. The units of this parameter are the same as the units used in your spatial reference system.
Example
{
"rasterFunction": "ElevationVoidFill",
"rasterFunctionArguments": {
"MaxVoidWidth": 0
}
}
"rasterFunction": "ExtractBand"
Introduced at 10.2.1, the ExtractBand function allows you to extract one or more bands from a raster, or it can reorder the bands in a multiband image. For more information, see the Extract Bands function.
The arguments for the ExtractBand function are as follows:
{
"rasterFunction": "ExtractBand",
"rasterFunctionArguments": {
"BandIDs": [<id>,<id>,<id>] //array of int
"BandNames": ["<name>","<name","<name"] //array of string
"BandWavelengths": [<wavelength>,<wavelength>,<wavelength>] //array of double
"MissingBandAction": <act> //int, 0=esriMissingBandActionFindBestMatch, 1=esriMissingBandActionFail
"WavelengthMatchTolerance": <WavelengthMatchTolerance>, //double
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "ExtractBand",
"rasterFunctionArguments": {
"BandIDs": [3,2,1],
"Raster": "$$"
}
}
"rasterFunction": "Geometric"
Introduced at 10.1, the Geometric function transforms the image (for example, orthorectification) based on a sensor definition and a terrain model. For more information, see the Geometric function.
The arguments for the Geometric function are as follows:
{
"rasterFunction": "Geometric",
"rasterFunctionArguments": {
"GeodataTransforms": <GeodataTransform>, //Please refer to the Geodata Transformations documentation for more details.
"AppendGeodataXform": <true|false>, //boolean
"ZFactor": <ZFactor>, //double
"ZOffset": <ZOffset>, //double
"ConstantZ": <ConstantZ>, //double
"CorrectGeoid": <true|false>, //boolean
"Raster":n<raster> //optional, default is the image service
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "Geometric",
"rasterFunctionArguments": {
"GeodataTransforms": [
{
"geodataTransform": "Polynomial",
"geodataTransformArguments": {
"sourcePoints": [
{
"x": 0,
"y": 0
},
{
"x": 0,
"y": 200
},
{
"x": 200,
"y": 0
}
],
"targetPoints": [
{
"x": 100,
"y": 100
},
{
"x": 100,
"y": 300
},
{
"x": 300,
"y": 100
}
],
"polynomialOrder": 1,
"spatialReference": {
"wkid": 54004
}
}
}
],
"AppendGeodataXform": true
},
"variableName": "Raster"
}
"rasterFunction": "Grayscale"
Introduced at 10.6, the Grayscale function converts a multi-band image into a single-band grayscale image. Specified weights are applied to each of the input bands, and a normalization is applied for output. For more information, see Grayscale function.
The arguments for the Greyscale function are as follows:
{
"rasterFunction": "Grayscale",
"rasterFunctionArguments": {
"conversionParameters": <array_of_double>, //a length of N array representing weights for each band. N=band count.
"Raster": <raster> //optional, default is the image service
}
}
Example
Below is an example that demonstrates how to perform a linear transformation for a three-band input raster.
{
"rasterfunction": "Grayscale",
"rasterfunctionarguments": {
"conversionparameters": [1,3,2],
"raster": "$$"
}
}
Output = (1 * Input_band_1 + 3 * Input_band_2 + 2 * Input_band_3)/(1 + 3 + 2);
"rasterFunction": "Hillshade"
A hillshade is a grayscale 3D model of the surface taking the sun's relative position into account to shade the image. For more information, see Hillshade function and How Hillshade works.
The arguments for the Hillshade function are as follows:
{
"rasterFunction": "Hillshade",
"rasterFunctionArguments": {
"HillshadeType": <HillshadeType>, //new at 10.5.1.; 0=traditional, 1=multi-directional; default is 0.
"Azimuth": <Azimuth>, //double (e.g. 215.0)
"Altitude": <Altitude>, //double (e.g. 75.0)
"ZFactor": <ZFactor>, //double (e.g. 0.3)
"SlopeType": <SlopeType>, //new at 10.2; 1=DEGREE, 2=PERCENTRISE, 3=SCALED; default is 1.
"PSPower": <PSPower>, //new at 10.2. double, used together with SCALED slope type
"PSZFactor": <PSZFactor>, //new at 10.2. double, used together with SCALED slope type
"RemoveEdgeEffect": <SlopeType> //new at 10.2. boolean, true of false
"DEM": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "DEM"
}
Example
{
"rasterFunction": "Hillshade",
"rasterFunctionArguments": {
"Azimuth": 215.0,
"Altitude": 75.0,
"ZFactor": 0.3
},
"variableName": "DEM"
}
"rasterFunction": "Identity"
Introduced at 10.6, the Identity function is used to define the source raster as part of the default mosaicking behavior of the mosaic dataset. This function is a no-op function and takes no arguments except a raster. For more information, see Identity function
The arguments for the Identity function are as follows:
{
"rasterFunction": "Identity",
"rasterFunctionArguments": {
"Raster": <raster>
}
}
"rasterFunction": "Local"
The Local function allows you to perform bitwise, conditional, logical, mathematical, and statistical operations on a pixel-by-pixel basis. The Local function works on single band or the first band of an image only, and the output is single band. For more information, see Local function. There are many operations supported by the Local function, see esriGeoAnalysisFunctionEnum Constants for more information.

At 10.5, you must license your ArcGIS Server as ArcGIS Server 10.9.1 Enterprise Advanced or ArcGIS Image Server to use this resource. At versions prior to 10.5, the hosting ArcGIS Server needs to have a Spatial Analyst license.
The arguments for the Local function are as follows:
{
"rasterFunction": "Local",
"rasterFunctionArguments": {
"Operation": <operation> //int see reference below.
"Rasters": [<raster1>, <raster2>, <raster3>] //array of rasters. If a scalar is needed for the operation the scalar can be in double or string
"ExtentType": <ExtentType>, //int, optional, default 0. 0=esriExtentFirstOf, 1=esriExtentIntersectionOf, 2=esriExtentUnionOf, 3=esriExtentLastOf
"CellsizeType": <CellsizeType>,//int, optional, default 0. 0=esriCellsizeFirstOf, 1=esriCellsizeMinOf, 2=esriCellsizeMaxOf, 3=esriCellsizeMeanOf, 4=esriCellsizeLastOf
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>",//optional
"variableName": "Rasters"//optional
}
Example
{
"rasterFunction": "Local",
"rasterFunctionArguments": {
"Operation": 2,
"Rasters": ["$$",100]
}
}
"rasterFunction": "Mask"
Introduced at 10.2.1, the Mask function changes the image by specifying a certain pixel value or a range of pixel values as no data. For more information, see the Mask function.
The arguments for the Mask function are as follows:
{
"rasterFunction": "Mask",
"rasterFunctionArguments": {
"NoDataValues": [ //array of string
"band0_val",
"band1_val",
...
],
"IncludedRanges": [ //array of double
band0_lowerbound,
band0_upperbound,
band1
...
],
"NoDataInterpretation": <NoDataInterpretation>, //int 0=esriNoDataMatchAny, 1=esriNoDataMatchAll
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "Mask",
"rasterFunctionArguments": {
"NoDataValues": ["-100"],
"IncludedRanges": [-800,100],
"NoDataInterpretation": 0
},
"variableName": "Raster"
}
"rasterFunction": "MLClassify"
Introduced at 10.2.1, the MLClassify function allows you to perform a supervised classification using the maximum likelihood classification algorithm. The hosting ArcGIS Server needs to have a Spatial Analyst license. For more information, see the ML Classify function.

At 10.5, you must license your ArcGIS Server as ArcGIS Server 10.9.1 Enterprise Advanced or ArcGIS Image Server to use this resource. At versions prior to 10.5, the hosting ArcGIS Server needs to have a Spatial Analyst license.
The arguments for the MLClassify function are as follows:
{
"rasterFunction": "MLClassify",
"rasterFunctionArguments": {
"SignatureFile": "<signature>", //string. a signature string returned from computeClassStatistics (GSG)
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
"rasterFunction": "MultidimensionalRaster"
Introduced at 10.8.1, the MultidimensionalRaster function adds a multidimensional dataset, such as netcdf, grib, hdf files, multidimensional mosaic dataset, or multidimensional CRF to a multidimensional raster. For more information, see the ArcGIS Pro Multidimensional Raster function.

This function will only work if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the MultidimensionalRaster function are as follows:
{
"rasterFunction": "MultidimensionalRaster",
"rasterFunctionArguments": {
"Variables": [ //array of string
"<variable1_name>",
"<variable2_name",
…
]
"InterpolationMethod": <int>, //optional, used when the input raster is not regular grids. 0="Nearest Neighbor", 1="Linear Tinning", 2="Natural Neighbor", and 3="Inverse Distance Weighted". Default value is 0 .
"InterpolationCellsize": <double>, //optional, used when the input raster is not regular grids. Defines the cell size of the output raster. Default value = 1
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
Below is an example that demonstrates how to add the netcdf file in a data store to a multidimensional raster in the example below.
{
"rasterFunction": "MultidimensionalRaster",
"rasterFunctionArguments": {
"Variables": [
"salinity",
"water_temp"
]
"Raster": "/fileShares/data/hycom.nc"
}
}
"rasterFunction": "MultidimensionalFilter"
Introduced at 10.8.1, the MultidimensionalFilter function filters a multidimensional raster using specified variables and dimensions. For more information, see the ArcGIS Pro Multidimensional Filter function.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the MultidimensionalFilter function are as follows:
{
"rasterFunction": "MultidimensionalFilter",
"rasterFunctionArguments": {
"Filter": <filter_json>, //a json object that defines the filter definition.
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example 1
The example below demonstrates how to filter a raster using two variables, salinity and surf_el, with all slices.
{
"rasterFunction": "MultidimensionalFilter",
"rasterFunctionArguments": {
"Filter": {
"variables": [
"salinity",
"surf_el"
],
"definitionType": "ALL"
},
"Raster": "$$"
}
}
Example 2
The example below demonstrates how to filter a raster using two variables, salinity and surf_el, with slices having StdTimeas "2013-05-17T00:00:00" and "2013-05-17T15:00:00".
{
"rasterFunction": "MultidimensionalFilter",
"rasterFunctionArguments": {
"Filter": {
"variables": [
"salinity",
"surf_el"
],
"definitionType": "BY_VALUES",
"dimensions": [
"StdTime",
"StdTime"
],
"values": [
"2013-05-17T00:00:00",
"2013-05-17T15:00:00"
]
},
"Raster": "$$"
}
}
Example 3
The example below demonstrates how to filter a raster using two variables, salinity and surf_el, with slices having StdTime in the [ "2013-05-17T00:00:00", "2013-05-17T12:00:00"]range and StdZ in the [-40, 0] range.
{
"rasterFunction": "MultidimensionalFilter",
"rasterFunctionArguments": {
"Filter": {
"variables": [
"salinity",
"surf_el"
],
"definitionType": "BY_RANGES",
"dimensions": [
"StdTime",
"StdZ"
],
"minValues": [
"2013-05-17T03:00:00",
"-40"
],
"maxValues": [
"2013-05-17T12:00:00",
"0"
]
}
"Raster": "$$"
}
}
Example 4
The example below demonstrates how filter a raster using two variables, salinity and surf_el, with slices having StdTime, and stepping from "2013-05-17T03:00:00" to "2013-05-18T18:00:00" every three (3) hours.
{
"rasterFunction": "MultidimensionalFilter",
"rasterFunctionArguments": {
"Filter": {
"variables": [
"salinity",
"surf_el"
],
"definitionType": "BY_ITERATION",
"dimension": "StdTime",
"startValue": "2013-05-17T03:00:00",
"endValue": "2013-05-18T18:00:00",
"stepValue": 3,
"units": "HOURS"
},
"Raster": "$$"
}
}
"rasterFunction": "NDVI"
The Normalized Difference Vegetation Index (NDVI) is a standardized index that allows you to generate an image displaying greenness (relative biomass). This index takes advantage of the contrast of the characteristics of two bands from a multispectral raster dataset—the chlorophyll pigment absorptions in the red band and the high reflectivity of plant materials in the near-infrared (NIR) band. For more information, see NDVI function.
The following equation is used by the NDVI function to generate a 0–200 range 8 bit result:
NDVI = ((IR - R)/(IR + R)) * 100 + 100. If you need the specific pixel values (-1.0 to 1.0), use the BandArithmetic function and choose the NDVI method.
The arguments for the NDVI function are as follows:
{
"rasterFunction": "NDVI",
"rasterFunctionArguments": {
"VisibleBandID": <VisibleBandID>, //int (zero-based band id, e.g. 2)
"InfraredBandID": <InfraredBandID>, //int (zero-based band id, e.g. 1)
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "NDVI",
"rasterFunctionArguments": {
"VisibleBandID": 2,
"InfraredBandID": 1
},
"variableName": "Raster"
}
"rasterFunction": "Pansharpening"
Introduced at 10.6, the Pansharpening function uses a higher-resolution panchromatic raster to fuse with a lower-resolution, multiband raster. It can generate colorized multispectral image with higher resolution. For more information, see Pan-sharpening function.
The arguments for the pansharpening function are as follows:
{
"rasterFunction": "pansharpening",
"rasterFunctionArguments": {
"Weights": <array_of_double>, //Weights applied for Red, Green, Blue, Near-Infrared bands. 4-elements array, Sum of values is 1.
"PansharpeningType": <int>, //Pansharpening method, 0:IHS; 1:Brovey; 2:Esri; 3:Simple Mean; 4:Gram-Schmidt.
"PanImage": <raster>,
"MSImage": <raster>,
"InfraredImage": <raster>, //optional if "UseFourthBandOfMSAsIR" is true or selected pansharpening method doesn’t require near-infrared image.
"UseFourthBandOfMSAsIR": <true|false>, //true if "MSImage" has near-infrared image on fourth band.
"Sensor": <string>, //optional sensor name.
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
}
}
Example
Below is an example that demonstrates Pansharpening Landsat 8 data with Gram-Schmidt method. The image service is published from the Landsat 8 mosaic dataset "$oid"="$band_number".
{
"rasterFunction": "Pansharpening",
"rasterFunctionArguments": {
"Weights": [
0.42,
0.51,
0.07,
0
],
"PansharpeningType": 4,
"PanImage": "$8",
"MSImage": {
"rasterFunction": "CompositeBand",
"rasterFunctionArguments": {
"Rasters": [
"$4",
"$3",
"$2",
"$5"
]
}
},
"UseFourthBandOfMSAsIR": false
}
}
"rasterFunction": "ProcessRasterCollection"
Introduced at 10.8.1, the ProcessRasterCollection function processes each slice in a multidimensional raster or each item in a mosaic raster using different functions. This function can also aggregate multiple slices into a single slice. For more information including operators supported, see the ArcGIS Pro Process Raster Collection function.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the ProcessRasterCollection function are as follows:
{
"rasterFunction": "ProcessRasterCollection",
"rasterFunctionArguments": {
"ItemFunction": <function_template_file>, \\ optional, the path to a function template file (.rft.xml) to process each slice or each item in the raster
"AggregationFunction": <function_template_file>, \\ optional, the path to a function template file (.rft.xml) to aggregate multiple slices into a single slice
"ProcessingFunction": <function_template_file>, \\ optional, the path to a function template file (.rft.xml) to process the raster , e.g., add a colormap to render
"AggregationDefinition": <json>, \\ optional, used when AggregationFunction is specified.
"Raster": "$$"
}
}
Example 1
The example below demonstrates how to calculate NDVI for each item in the mosaic dataset.
{
"rasterFunction": "ProcessRasterCollection",
"rasterFunctionArguments": {
"ItemFunction": "/fileShares/rft/NDVI.rft.xml",
"Raster": "$$"
}
}
Example 2
The example below demonstrates how to calculate the maximum temperature across all time slices.
{
"rasterFunction": "ProcessRasterCollection",
"rasterFunctionArguments": {
"AggregationFunction": "/fileShares/rft/CellStatisticsMax.rft.xml",
"AggregationDefinition": {"definitionType":"ALL","dimension":"StdTime"},
"Raster": "$$"
}
}
Example 3
The example below demonstrates how to calculate the maximum temperature per year.
{
"rasterFunction": "ProcessRasterCollection",
"rasterFunctionArguments": {
"AggregationFunction": "/fileShares/rft/CellStatisticsMax.rft.xml",
"AggregationDefinition": {
"definitionType": "INTERVAL_KEYWORD",
"dimension": "StdTime",
"intervalKeyword": "YEARLY"
},
"Raster": "$$"
}
}
Example 4
The example below demonstrates how to calculate the maximum temperature within the [2001-01-01T00:00:00, 2008-01-01T00:00:00] range .
{
"rasterFunction": "ProcessRasterCollection",
"rasterFunctionArguments": {
"AggregationFunction": "/fileShares/rft/CellStatisticsMax.rft.xml",
"AggregationDefinition": {
"definitionType": "INTERVAL_RANGES",
"dimension": "StdTime",
"minValues": ["2001-01-01T00:00:00"],
"maxValues": ["2008-01-01T00:00:00"]
}
"Raster": "$$"
}
}
Example 5
The example below demonstrates how to calculate the maximum temperature every 5 days.
{
"rasterFunction": "ProcessRasterCollection",
"rasterFunctionArguments": {
"AggregationFunction": "/fileShares/rft/CellStatisticsMax.rft.xml",
"AggregationDefinition": {
"definitionType": "INTERVAL_VALUE",
"dimension": "StdTime",
"intervalValue": 5,
"intervalUnits": "DAYS"
},
"Raster": "$$"
}
}
Example 6
The example below demonstrates how to calculate the NDVI for each scene, return the maximum NDVI value across different items, and apply a NDVI colormap.
{
"rasterFunction": "ProcessRasterCollection",
"rasterFunctionArguments": {
"ItemFunction": "/fileShares/rft/NDVI.rft.xml",
"AggregationFunction": "/fileShares/rft/CellStatisticsMax.rft.xml",
"AggregationDefinition": {
"definitionType": "ALL",
"dimension": "StdTime"
},
"ProcessingFunction": "/fileShares/rft/Colormap.rft.xml",
"Raster": "$$"
}
}
"rasterFunction": "RasterCalculator"
Introduced at 10.6, the RasterCalculator function provides access to all existing math functions so you can make calls to them when building your expressions. The calculator function requires single-band inputs. If you need to perform expressions on bands in a multispectral image as part of a function chain, you can use the Extract Bands function before the RasterCalculator function. For more information including operators supported, see the Calculator function.
The arguments for the RasterCalculator function are as follows:
{
"rasterFunction": "RasterCalculator",
"rasterFunctionArguments": {
"InputNames": [ //array of strings for arbitrary raster names
"raster1_Name",
"raster2_Name",
"raster3_Name”,
…
],
"Expression": "raster1_Name + raster2_Name - raster3_Name”, //string, expression to calculate output raster from input rasters
"ExtentType": <ExtentType>, //int, optional, default 0; 0=esriExtentFirstOf, 1=esriExtentIntersectionOf, 2=esriExtentUnionOf, 3=esriExtentLastOf
"CellsizeType": <CellsizeType>, //int, optional, default 0; 0=esriCellsizeFirstOf, 1=esriCellsizeMinOf, 2=esriCellsizeMaxOf, 3=esriCellsizeMeanOf, 4=esriCellsizeLastOf
"Rasters": [ //array of rasters
<raster1>,
<raster2>,
<raster3>,
…
]
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
Add the first item and second item of the image service.
{
"rasterFunction": "RasterCalculator",
"rasterFunctionArguments": {
"InputNames": [
"a1",
"name2"
],
"Expression": "a1+name2",
"ExtentType": 0,
"CellsizeType": 1,
"Rasters": [
"$1",
"$2"
]
}
}
"rasterFunction": "Recast"
The Recast function reassigns argument values in an existing function template. For more information, see the Recast function.
The arguments for the Recast function are based on the function it is overwriting.
{
"rasterFunction": "Recast",
"rasterFunctionArguments": {
"<ArgumentName1>": <ArgumentValue1>, //ArgumentName1 will be reassigned with ArgumentValue1
"<ArgumentName2>": <ArgumentValue2>, //ArgumentName1 will be reassigned with ArgumentValue2
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
The example below demonstrates how to view the high vegetation and buildings class of a particular LAS in a mosaic.
LAS Function contains ClassTypes that can be used in REST API through the Recast function. ClassTypes include the following:
- 0: Never Classified
- 1: Unclassified
- 2: Ground
- 3: Low Vegetation
- 4: Medium Vegetation
- 5: High Vegetation
- 6: Building
- 7: Noisy Low Point
- 8: Model Key Point
- 9: Water
- 10: Rail
- 11: Road Surface
- 12: Reserved
- 13: Wire guard
- 14: Wire conductor
- 15: Transmission tower
- 16: Wire structure connector
- 17: Bridge deck
- 18: High noise
{
{
"mosaicMethod": "esriMosaicLockRaster",
"lockRasterIds": [1],
"ascending": true,
"mosaicOperation": "MT_FIRST",
"itemRenderingRule": {
"rasterFunction": "Recast",
"rasterFunctionArguments": {
"ClassTypes": [5,6]
}
}
}
}
The example below demonstrates how to change the ZFactor of an existing hillshade function on the first raster in the service.
{
"rasterFunction": "Recast",
"rasterFunctionArguments": {
"ZFactor": 3.5,
"Raster": "$1"
}
}
"rasterFunction": "Remap"
Introduced at 10.1, the Remap function allows you to change or reclassify the pixel values of the raster data. For more information, see Remap function.
The arguments for the Remap function are as follows:
{
"rasterFunction": "Remap",
"rasterFunctionArguments": {
"InputRanges": [ //[double, double,…], input ranges are specified in pairs: from (inclusive) and to (exclusive).
<value1_from>,
<value1_to>,
…
],
"OutputValues": [ //[double, …], output values of corresponding input ranges
<value1>,
…
],
"GeometryType": <geometryType>, //added at 10.3
"Geometries": [ //added at 10.3
<geometry1>,
<geometry2>,
...
],
"NoDataRanges": [ //[double, double, …], nodata ranges are specified in pairs: from (inclusive) and to (exclusive).
<nodatavalue1_from>,
<nodatavalue1_to>,
…
],
"AllowUnmatched": <true|false>, //Boolean, specify whether to keep the unmatched values or turn into nodata.
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
The example below demonstrates how to remap pixel values.
{
"rasterFunction": "Remap",
"rasterFunctionArguments": {
"InputRanges": [
0,
100,
101,
200
],
"OutputValues": [
5,
125
],
},
"variableName": "Raster"
}
The example below demonstrates how to use the Remap function with geometry values
{
"rasterFunction": "Remap",
"rasterFunctionArguments": {
"InputRanges": [50,51],
"OutputValues": [71],
"GeometryType": "esriGeometryEnvelope",
"Geometries": [
{
"spatialReference": {
"wkid": 2264
},
"rings": [
[
[1432285,529578],
[1436048, 529578],
[1434048,531578],
[1433285,533205],
[1432285,529578]
]
]
}
]
}
}
"rasterFunction": "Resample"
The Resample function resamples pixel values from a given resolution. For more information, see the Resample function.
Use this function only if the workflow has specific computing requirements, such as computing average wind magnitude-direction. Resampling from a designated resolution can be much slower than the default behavior (nearest resolution). In most cases, using the interpolation parameter in the exportImage request is sufficient.
The arguments for the Resample function are as follows:
{
"rasterFunction": "Resample",
"rasterFunctionArguments": {
"ResamplingType": <ResamplingType>, //0=NearestNeighbor, 1=Bilinear, 2=Cubic, 3=Majority, 4=BilinearInterpolationPlus, 5=BilinearGaussBlur, 6=BilinearGaussBlurPlus, 7=Average, 8=Minimum, 9=Maximum, 10=VectorAverage (require two bands)
"InputCellsize": <InputCellsize>, //point that defines cellsize in source spatial reference
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}

InputCellsize only supports source spatial reference.
Example
The example below demonstrates how to resample a wind magnitude-direction raster using vector average from base resolution.
{
"rasterFunction": "Resample",
"rasterFunctionArguments": {
"ResamplingType": 10,
"InputCellsize": {
"x": 0.125,
"y": 0.125
}
}
}
"rasterFunction": "SegmentMeanShift"
The SegmentMeanShift function produces a segmented output. Pixel values in the output image represent the converged RGB colors of the segment. The input raster needs to be a 3-band 8-bit image. If the image service is not a 3-band 8-bit unsigned image, you can use the Stretch function before the SegmentMeanShift function. For more information, see the Segment Mean Shift function.

At 10.5, you must license your ArcGIS Server as ArcGIS Server 10.9.1 Enterprise Advanced or ArcGIS Image Server to use this resource. At versions prior to 10.5, the hosting ArcGIS Server needs to have a Spatial Analyst license.
The arguments for the SegmentMeanShift function are as follows:
{
"rasterFunction": "SegmentMeanShift",
"rasterFunctionArguments": {
"SpectralDetail": <SpectralDetail>, //double 0-21. Bigger value is faster and has more segments.
"SpatialDetail": <SpatialDetail>, //int 0-21. Bigger value is faster and has more segments.
"SpectralRadius": <MaxValue>, //double. Bigger value is slower and has less segments.
"SpatialRadius": <UndefinedClass>, //int. Bigger value is slower and has less segments.
"MinNumPixelsPerSegment": <MinNumPixelsPerSegment>, //int
"Raster": <Raster> //the raster to be segmented. optional, default is the service.
},
"outputPixelType": "<outputPixelType>", //optional
}

When specifying arguments for SegmentMeanShift, use either SpectralDetail,SpatialDetail as a pair, or use SpectralRadius, SpatialRadius. They have an inverse relationship. SpectralRadius = 21 - SpectralDetail, SpatialRadius = 21 - SpectralRadius
Example
Below is an example that demonstrates how to segment and image
{
"rasterFunction": "SegmentMeanShift",
"rasterFunctionArguments": {
"SpectralDetail": 15.5,
"SpatialDetail": 15,
"MinNumPixelsPerSegment": 20,
"Raster": "$$"
}
}
"rasterFunction": "ShadedRelief"
Shaded relief is a color 3D model of the terrain, created by merging the images from the Elevation-coded and Hillshade methods. For more information, see Shaded relief function. You may choose to specify a colormap or a colorramp to render the shaded relief results. For more predefined color ramps, please refer to the colorrampname parameter in colormap raster function.
The arguments for the ShadedRelief function are as follows:
{
"rasterFunction": "ShadedRelief",
"rasterFunctionArguments": {
"HillshadeType": <HillshadeType>, //new at 10.8.1. 0=Traditional, 1=Multidirectional. Default is 0.
"Azimuth": <Azimuth>, //double (e.g. 215.0)
"Altitude": <Altitude>, //double (e.g. 75.0)
"ZFactor": <ZFactor>, //double (e.g. 0.3)
"Colormap": [
[<value1>, <red1>, <green1>, <blue1>], //[int, int, int, int]
[<value2>, <red2>, <green2>, <blue2>]
],
"Colorramp": "<Black To White | Yellow To Red | Slope | more…>"
"SlopeType": <SlopeType>, //new at 10.2. 1=DEGREE, 2=PERCENTRISE, 3=SCALED. default is 1.
"PSPower": <PSPower>, //new at 10.2. double, used together with SCALED slope type
"PSZFactor": <PSZFactor>, //new at 10.2. double, used together with SCALED slope type
"RemoveEdgeEffect": <SlopeType>, //new at 10.2. boolean, true of false
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "ShadedRelief",
"rasterFunctionArguments": {
"Azimuth": 215.0,
"Altitude": 75.0,
"ZFactor": 0.3,
"Colormap": [
[1, 255, 0, 0],
[2, 0, 255, 0],
[3, 125, 25, 255],
...
],
"Raster": <raster>
},
"variableName": "Raster"
}
"rasterFunction": "Slope"
Slope represents the rate of change of elevation for each pixel. For more information, see Slope function and How Slope works.
The arguments for the Slope function are as follows:
{
"rasterFunction": "Slope",
"rasterFunctionArguments": {
"ZFactor": <ZFactor> //double (e.g. 0.3)
"SlopeType": <SlopeType>, //new at 10.2. 1=DEGREE, 2=PERCENTRISE, 3=SCALED. default is 1.
"PSPower": <PSPower>, //new at 10.2. double, used together with SCALED slope type
"PSZFactor": <PSZFactor>, //new at 10.2. double, used together with SCALED slope type
"RemoveEdgeEffect": <RemoveEdgeEffect> //new at 10.2. boolean, true of false
"DEM": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "DEM"
}
Example
{
"rasterFunction": "Slope",
"rasterFunctionArguments": {
"ZFactor": 0.3
}
}
"rasterFunction": "Speckle"
Introduced at 10.6, the Speckle function filters the speckled radar dataset to smooth out the noise while retaining the edges or sharp features in the image. Four speckle reduction filtering algorithms are provided through this function. For more information including required and optional parameters for each filter and the default parameter values, see the Speckle function.
The arguments for the Speckle function are as follows:
{
"rasterFunction": "Speckle",
"rasterFunctionArguments": {
"FilterType": <int>, //0=Lee, 1=Enhanced Lee, 2=Frost, 3=Kuan
"FilterSize": <int>, //kernel size. 0=3x3, 1=5x5, 2=7x7, 3=9x9, 4=11x11
"NoiseModel": <int>, //for Lee filter only. 0: Multiplicative Noise, 1: Additive Noise, 2: Additive and Multiplicative Noise
"NoiseVar": <double> //for Lee filter with NoiseModel 1 or 2 only.
"AdditiveNoiseMean": <double> //for lee filter with NoiseModel 2 only.
"MultiplicativeNoiseMean": <double> //for lee filter with NoiseModel 0 or 2 only.
"NLooks": <int> //for Lee, Enhanced Lee, and Kuan filters.
"DampFactor": <double>, //for Enhanced Lee and Frost filters.
"Raster": <raster>
}
}
Example
Below is an example that demonstrates how to despeckle a radar image service with the Lee filter
{
"rasterFunction": "Speckle",
"rasterFunctionArguments": {
"FilterType": 0,
"FilterSize": 4,
"NoiseModel": 0,
"MultiplicativeNoiseMean": 1,
"NLooks": 1,
"Raster": "$$"
}
}
"rasterFunction": "SpectralConversion"
Introduced at 10.6, the SpectralConversion function applies a matrix to a multi-band image to affect the spectral values of the output. In the matrix, different weights can be assigned to all the input bands to calculate each of the output bands. The column/row size of the matrix equals to the band count of input raster. For more information, see the Spectral Conversion function.
The arguments for the SpectralConversion function are as follows:
{
"rasterFunction": "SpectralConversion",
"rasterFunctionArguments": {
"ConversionMatrix": <array_of_double>, //a NxN length one-dimension matrix. N=band count.
"Raster": <raster> //optional, default is the image service
}
}
Example
Below is an example that demonstrates how to perform a linear transformation for a three-band input raster.
{
"rasterfunction": "SpectralConversion",
"rasterfunctionarguments": {
"conversionmatrix": [0.3,0.2,0.5,0,1,0,1,0,0],
"raster": "$$"
}
}
Below is an illustration of how numbers in conversion matrix will be used.
Output band_1 = 0.3 * Input_band_1 + 0.2 * Input_band_2 + 0.5 * Input_band_3;
Output band_2 = 0 * Input_band_1 + 1 * Input_band_2 + 0 * Input_band_3;
Output band_3 = 1 * Input_band_1 + 0 * Input_band_2 + 0 * Input_band_3;
"rasterFunction": "SpectralUnmixing"
Introduced at 10.8.1, the SpectralUnmixing function performs subpixel classification and calculates the fractional abundance of different land cover types for individual pixels. For more information including operators supported, see the ArcGIS Pro Linear Spectral Unmixing function.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the SpectralUnmixing function are as follows:
{
"rasterFunction": "SpectralUnmixing",
"rasterFunctionArguments": {
"SpectralProfileType": <int>, //0=using Spectral profile file, value, 1=using training feature
"SpectralProfileFile": <string>, //the path to a ECD file or a JSON file. Optional, used when SpectralProfileType is 0.
"TrainingFeature": <string>, //the path to a training feature dataset. used when SpectralProfileType is 1.
"SpectralProfileDefinition": <json>, //a json object that defines the spectral profile parameters.
"NonNegative": <bool>, //constrains the outputs to be non-negative. Default: False
"SumToOne": <bool>, //constrains the outputs to sum to one. Default: False
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
Below is an example that demonstrates Linear Spectral Unmixng using the SpectralProfile definition.
{
"rasterFunction": "SpectralUnmixing",
"rasterFunctionArguments": {
"NonNegative": true,
"SumToOne": true,
"Raster": "$$",
"SpectralProfileDefinition": {
"EsriClassifierDefinitionFile": 0,
"FileVersion": 3,
"NumberDefinitions": 1,
"Definitions": [
{
"Classifier": "MaximumLikelihood",
"NumberClasses": 2,
"RasterIsSegmented": false,
"NumberBands": 3,
"Classes": [
{
"ClassValue": 1,
"ClassName": "Vegetation",
"Red": 230,
"Green": 0,
"Blue": 0,
"Count": 546,
"Means": [
244.9359,
14.88278,
15.21978
],
"Covariances": [
[
10.26146,
0.1390063,
0.1074951
],
[
0.1390063,
10.31593,
1.207584E-04
],
[
0.1074951,
1.207584E-04,
10.19345
]
]
},
{
"ClassValue": 2,
"ClassName": "Water",
"Red": 0,
"Green": 77,
"Blue": 168,
"Count": 716,
"Means": [
15.05587,
15.01257,
244.9567
],
"Covariances": [
[
10.18124,
0.1152196,
0.2789551
],
[
0.1152196,
10.02638,
-0.3583943
],
[
0.2789551,
-0.3583943,
110.11684
]
]
}
]
}
]
}
}
}
"rasterFunction": "Statistics"
The Statistics function calculates focal statistics for each pixel of an image based on a defined focal neighborhood. For more information, see Statistics function.
The arguments for the Statistics function are as follows:
{
"rasterFunction": "Statistics",
"rasterFunctionArguments": {
"Type": "<Min | Max | Mean | StandardDeviation>",
"KernelColumns": <KernelColumns>, //int (e.g. 3)
"KernelRows": <KernelRows> //int (e.g. 3)
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
The following syntax is supported from 10.2.1. The existing syntax above is also supported.
{
"rasterFunction": "Statistics",
"rasterFunctionArguments": {
"Type": <Type>, //int 1=Min, 2=Max, 3=Mean, 4=StandardDeviation
"Columns": <Columns>, //int (e.g. 3)
"Rows": <Rows>, //int (e.g. 3)
"FillNoDataOnly": <fillNoDataOnly>, //bool
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "Statistics",
"rasterFunctionArguments": {
"Type": "Mean",
"KernelColumns": 3,
"KernelRows": 3
},
"variableName": "Raster"
}
"rasterFunction": "StatisticsHistogram"
Introduced at 10.6, the StatisticsHistogram function is used to define the statistics and histogram of a raster. It is normally used for control the default display of exported image. For more information, see Statistics and Histogram function.
The arguments for the StatisticsHistogram function are as follows:
{
"rasterFunction": "StatisticsHistogram",
"rasterFunctionArguments": {
"Statistics": <array of statistics objects>, //predefined statistics for each band
"Histograms": <array of histogram objects>, //predefined histograms for each band
"Raster": <raster> //optional, default is the image service
}
}
Example
The example below demonstrates how to customize the statistics and histograms for input raster.
{
"rasterFunction": "StatisticsHistogram",
"rasterFunctionArguments": {
"statistics": [
{
"min": 0,
"max": 23.064547000000001,
"mean": 4.547517,
"standardDeviation": 2.6870280000000002,
"count": 10000,
"median": 5,
"mode": 6
}
],
"histograms": [
{
"size": 256,
"min": 0,
"max": 23.064547032777931,
"counts": [
559,
172,
217,
... //256 elements for each of the bins in this example
]
}
]
}
}
"rasterFunction": "Stretch"
The Stretch function enhances an image through multiple stretch types. For more information, see Stretch function.
The arguments for the Stretch function are as follows:
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": <StretchType>, //int (0=None, 3=StandardDeviation, 4=Histogram Equalization, 5=MinMax, 6=PercentClip, 9=Sigmoid)
"Min": <min>, //double
"Max": <max>, //double
"NumberOfStandardDeviations": <NumberOfStandardDeviations>, //double (e.g. 2.5)
"Statistics": [
[<min1>, <max1>, <mean1>, <standardDeviation1>], //[double, double, double, double]
[<min2>, <max2>, <mean2>, <standardDeviation2>]
],
"DRA": <true|false>, //boolean. derive statistics from current request, Statistics parameter is ignored when DRA is true
"MinPercent": <minPercent>, //double (e.g. 0.25), applicable to PercentClip
"MaxPercent": <maxPercent>, //double (e.g. 0.5), applicable to PercentClip
"UseGamma": <true|false>,
"Gamma": [<gamma1>, <gamma2>, <gamma3>], //array of doubles
"ComputeGamma”: <true|false>, //optional, applicable to any stretch type when "UseGamma" is "true"
"SigmoidStrengthLevel": <sigmoidStrengthLevel>, //int (1~6), applicable to Sigmoid
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Gamma stretch works with all stretch types. The Gamma parameter is needed when UseGamma is set to true. Min and Max can be used to define output minimum and maximum. DRA is used to get statistics from the extent in the exportImage request. ComputeGamma will automatically calculate best gamma value to render exported image based on empirical model. Stretch type values and their requirements are as follows:
- 0 (None): Does not require other parameters.
- 3 (StandardDeviation): Requires NumberOfStandardDeviations, Statistics, or DRA as true.
- 4 (Histogram Equalization): Requires the source dataset to have histograms or additional DRA as true.
- 5 (MinMax): Requires Statistics or DRA as true.
- 6 (PercentClip): Requires MinPercent, MaxPercent, and DRA as true, or histograms from the source dataset.
- 9 (sigmoid): Does not require other parameters. Optionally, set the SigmoidStrengthLevel (1 to 6) to adjust the curvature of the Sigmoid curve used in color stretch.
Example 1 (StandardDeviation)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 3,
"NumberOfStandardDeviations": 2.5,
"Statistics": [
[0, 255, 56.7, 54.8],
[0, 255, 97.5, 94.5],
[0, 255, 87.5, 87.3]
],
"UseGamma": true,
"Gamma": [1.25, 1.25, 1.25],
},
"outputPixelType": "U8",
"variableName": "Raster"
}
Example 2 (MinMax)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 5,
"Statistics": [
[50, 200, 56.7, 54.8],
[50, 200, 97.5, 94.5],
[50, 200, 87.5, 87.3]
],
"Min": 100,
"Max": 255,
"UseGamma": false,
},
"outputPixelType": "U8",
"variableName": "Raster"
}
Example 3 (PercentClip)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 6,
"MinPercent": 0.25,
"MaxPercent": 0.25,
"Gamma": [1.25, 1.25, 1.25],
"DRA": true,
"Min": 100,
"Max": 255,
},
"outputPixelType": "U8",
"variableName": "Raster"
}
Example 4 (None)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 0,
},
"variableName": "Raster"
}
Example 5 (HistogramEqualization)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 4,
},
"outputPixelType": "U8",
"variableName": "Raster"
}
Example 6 (Sigmoid)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 9,
"SigmoidStrengthLevel": 1
},
"outputPixelType": "U8",
"variableName": "Raster"
}
"rasterFunction": "TasseledCap"
Introduced at 10.6, the TasseledCap function is designed to analyze and map vegetation and urban development changes detected by various satellite sensor systems. It is known as the Tasseled Cap transformation due to the shape of the graphical distribution of data. This function takes no arguments except a raster. The input for this function is the source raster of image service. There are no other parameters for this function because all the information is derived from the input's properties and key metadata (bands, data type, and sensor name). Only imagery from the Landsat MSS, Landsat TM, Landsat ETM+, IKONOS, QuickBird, WorldView-2 and RapidEye sensors are supported. Prior to applying this function, there should not be any functions that would alter the pixel values in the function chain, such as the Stretch, Apparent Reflectance or Pansharpening function. The only exception is for Landsat ETM+; when using Landsat ETM+, the Apparent Reflectance function must precede the Tasseled Cap function. For more information, see the Tasseled Cap function.
The arguments for the TasseledCap function are as follows:
{
"rasterFunction": "TasseledCap",
"rasterFunctionArguments": {
"Raster": <raster> //optional, default is the image service
}
}
"rasterFunction": "Threshold"
The binary Threshold function produces the binary image. It uses the Otsu method and assumes the input image to have a bi-modal histogram. For more information, see the Binary Thresholding function.
The arguments for the Threshold function are as follows:
{
"rasterFunction": "Threshold",
"rasterFunctionArguments": {
"ThresholdType": <ThresholdType>, //int 1=Otsu
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
The example below demonstrates the Otsu threshold.
{
"rasterFunction": "Threshold",
"rasterFunctionArguments": {
"ThresholdType": 1,
"Raster": "$$"
}
}
"rasterFunction": "TransposeBits"
The TransposeBits function performs a bit operation. It extracts bit values from the source data and assigns them to new bits in the output data. For more information, see the Transpose Bits function.
The arguments for the TransposeBits function are as follows:
{
"rasterFunction": "TransposeBits",
"rasterFunctionArguments": {
"InputBitPositions": <InputBitPositions>, //array of long, required
"OutputBitPositions": <DirectionBandID>, //array of long, required
"ConstantFillCheck": <true | false>, //bool, optional
"ConstantFillValue": <ConstantFillValue>, //int, required
"Raster": <Raster>, //optional, the input raster to be transposed, default is the service "$$"
"FillRaster": <size>, //optional, the fill raster
},
"outputPixelType": "<outputPixelType>", //optional
}
If ConstantFillCheck is false, it assumes there is an input FillRaster. If an input FillRaster is not given, it falls back ConstantFillCheck to true and looks for ConstantFillValue. Filling is used to initialize pixel values of the output raster.
Landsat 8 has a quality assessment band. The following are the example input and output bit positions to extract confidence levels by mapping them to 0-3:
- Landsat 8 Water: {"InputBitPositions":[4,5],"OutputBitPositions":[0,1]}
- Landsat 8 Cloud Shadow: {"InputBitPositions":[6,7],"OutputBitPositions":[0,1]}
- Landsat 8 Vegetation: {"InputBitPositions":[8,9],"OutputBitPositions":[0,1]}
- Landsat 8 Snow/Ice: {"InputBitPositions":[10,11],"OutputBitPositions":[0,1]}
- Landsat 8 Cirrus: {"InputBitPositions":[12,13],"OutputBitPositions":[0,1]}
- Landsat 8 Cloud: {"InputBitPositions":[14,15],"OutputBitPositions":[0,1]}
- Landsat 8 Designated Fill: {"InputBitPositions":[0],"OutputBitPositions":[0]}
- Landsat 8 Dropped Frame: {"InputBitPositions":[1],"OutputBitPositions":[0]}
- Landsat 8 Terrain Occlusion: {"InputBitPositions":[2],"OutputBitPositions":[0]}
Example
Below is an example that demonstrates how to extract Landsat 8 Snow/ice confidence levels.
{
"rasterFunction": "TransposeBits",
"rasterFunctionArguments": {
"InputBitPositions": [10,11],
"OutputBitPositions": [0,1],
"ConstantFillValue": 0,
"Raster": "$$",
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "U8",
}
Below is an example that demonstrates how to extract Landsat 8 Cirrus confidence levels and map to different colors for visualization.
{
"rasterFunction": "Colormap",
"rasterFunctionArguments": {
"Colormap": [
[0,255,0,0],
[1,0,255,0],
[2,0,0,255],
[3,255,255,0]
],
"Raster": {
"rasterFunction": "TransposeBits",
"rasterFunctionArguments": {
"InputBitPositions": [12,13],
"OutputBitPositions": [0,1],
"ConstantFillValue": 0,
}
}
}
}
"rasterFunction": "Trend"
Introduced at 10.8.1, the Trend function computes a forecasted multidimensional raster layer using the output trend raster from the Generate Trend function or Generate Trend Raster geoprocessing tool.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the Trend function are as follows:
{
"rasterFunction": "Trend",
"rasterFunctionArguments": {
"DimensionDefinitionType": <int>, // 0 means by value, 1 means by interval
"DimensionValues": <string>, // optional. used when DimensionDefinitionType is 0. Multiple dimension values are separated by semicolon, e.g., "0;-2" or "1990-01-01T00:00:00;1990-01-02T00:00:00"
"DimensionStart": <string>, //optional. used when DimensionDefinitionType is 1. Defines the start of the dimension interval, e.g., "-10" or "1990-01-01T00:00:00"
"DimensionEnd": <string>, //optional. used when DimensionDefinitionType is 1. Defines the end of the dimension interval, e.g., "0" or "1991-01-01T00:00:00"
"DimensionInterval": <int>, //optional. used when DimensionDefinitionType is 1. Defines the step of each interval
"DimensionUnit": <string>, //optional. Used when DimensionDefinitionType is 1 and the dimension along which the trend is calculated is time related. Its value is one of the following: "YEARS", "MONTHS", "WEEKS", "DAYS", "HOURS".
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example 1
The example below demonstrates how to predict the values at the DimensionValues of 0, -2, and -4..
{
"rasterFunction": "Trend",
"rasterFunctionArguments": {
"DimensionDefinitionType": 0,
"DimensionValues": "0;-2;-4",
"Raster": "$$"
}
}
Example 2
The example below demonstrates how to predict the values at the 1st day of each month in 1990.
{
"rasterFunction": "Trend",
"rasterFunctionArguments": {
"DimensionDefinitionType": 1,
"DimensionStart": "1990-01-01T00:00:00",
"DimensionEnd": "1990-12-31T00:00:00",
"DimensionInterval": 1,
"DimensionUnit": "MONTHS",
"Raster": "$$"
}
}
"rasterFunction": "TrendAnalysis"
Introduced at 10.8.1, the TrendAnalysis function estimates the trend for each pixel along a dimension for one or more variables in a multidimensional raster.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the TrendAnalysis function are as follows:
{
"rasterFunction": "TrendAnalysis",
"rasterFunctionArguments": {
"DimensionName": <string>, //the name of the dimension, along which the trend analysis is performed. e.g., "StdTime", "StdZ", etc.
"RegressionType": <int>, //0=Linear (Default), 1=Harmonic, 2=Polynomial
"Frequency": <int>, //optional. Used when RegressionType = 1 (Harmonic). Default value of Frequency is 1, means that the seasonal pattern repeats once per year
"Order": <int>, //optional. Used when RegressionType = 2 (Polynomial). Default value of Order is 2, means 2nd order polynomial regression
"IgnoreNoData": <bool>, //optional. Default value is True, which means only cells that are not noData value will be used in fitting the trend curve
"Raster": <raster> //optional, default is the image service
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example1 (Linear Trend)
{
"rasterFunction": "TrendAnalysis",
"rasterFunctionArguments": {
"DimensionName": "StdTime",
"RegressionType": 0,
"Raster": "$$"
}
}
Example 2 (Harmonic Trend)
{
"rasterFunction": "TrendAnalysis",
"rasterFunctionArguments": {
"DimensionName": "StdTime",
"RegressionType": 1,
"Frequency": 2,
"Raster": "$$"
}
}
Example 3 (Polynomial Trend)
{
"rasterFunction": "TrendAnalysis",
"rasterFunctionArguments": {
"DimensionName": "StdZ",
"RegressionType": 2,
"Order": 3,
"Raster": "$$"
}
}
"rasterFunction": "TrendToRGB"
Introduced at 10.8.1, the TrendToRGB converts a trend raster to a three-band (red, green, and blue) raster. For more information, see Trend to RGB function.

This function only works if the service provider is arcobjects11 or arcobjectsrasterrendering.
The arguments for the TrendToRGB function are as follows:
{
"rasterFunction": "TrendToRGB",
"rasterFunctionArguments": {
"Raster": <Raster>, //the input raster
"ModelType": <ModelType> //int, 0 = linear,1 = harmonic
}
}
Example
Below is an example that demonstrates how to convert the linear trend information from Generate Trend raster function.
{
"rasterFunction": "TrendToRGB",
"rasterFunctionArguments": {
"Raster": "lineartrend.crf",
"ModelType": 0
}
}
"rasterFunction": "UnitConversion"
The UnitConversion function performs unit conversions. For more information, see the Unit Conversion function.
The arguments for the UnitConversion function are as follows:
{
"rasterFunction": "UnitConversion",
"rasterFunctionArguments": {
"FromUnit": <FromUnit>, //units constant listed below (int)
"ToUnit": <ToUnit>, //units constant listed below (int)
"Raster": <Raster>, //the input raster, default is the service "$$"
},
"outputPixelType": "<outputPixelType>", //optional
}
FromUnit and ToUnit take the following:
- Speed Units: 100=esriMetersPerSecond, 101=esriKilometersPerHour, 102 =esriKnots, 103 =esriFeetPerSecond, 104=esriMilesPerHour
- Temperature Units: 200=esriCelsius,201=esriFahrenheit,202=esriKelvin
- Distance Units: 1=esriInches, 2=esriPoints, 3=esriFeet,4=esriYards,5=esriMiles, 6=esriNauticalMiles,7=esriMillimeters,8=esriCentimeters,9=esriMeters,10=esriKilometers,11=esriDecimalDegrees,12=esriDecimeters
Example
Below is an example that demonstrates how to convert pixel values from feet to meters.
{
"rasterFunction": "UnitConversion",
"rasterFunctionArguments": {
"FromUnit": 3,
"ToUnit": 9,
"Raster": "$$",
},
"outputPixelType": "U8",
}
"rasterFunction": "VectorField"
Introduced at 10.6, the VectorField function is used to composite two single-band rasters (each raster represents U/V or Magnitude/Direction) into a two-band raster (each band represents U/V or Magnitude/Direction). Data combination type (U-V or Magnitude-Direction) can also be converted interchangeably with this function. For more information, see Vector Field function.
The arguments for the VectorField function are as follows:
{
"rasterFunction": "VectorField",
"rasterFunctionArguments": {
"Raster1": <raster>, //raster item representing “U” or “Magnitude”
"Raster2": <raster>, //raster item representing “V” or “Direction”
"InputDataType": <string>, //”Vector-UV” or “Vector-MagDir” per input used in “Raster1” and “Raster2”
"AngleReferenceSystem": <int>, //optional when “InputDataType” is “Vector-UV”. 0: Geographic; 1: Arithmetic
"OutputDataType": <string>, //”Vector-UV” or “Vector-MagDir”
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
}
}
Example
Perform a vector field data composite and then a conversion from two single-band Magnitude and Direction rasters into one U-V two-band raster.
{
"rasterFunction": "VectorField",
"rasterFunctionArguments": {
"Raster1": “$1”,
"Raster2": “$2”,
"AngleReferenceSystem": 0,
"InputDataType": “Vector-MagDir”,
"OutputDataType": ”Vector-UV”
}
}
"rasterFunction": "VectorFieldRenderer"
Introduced at 10.6, the VectorFieldRenderer function symbolizes a U-V or Magnitude-Direction raster.
The arguments for the VectorFieldRenderer function are as follows:
{
"rasterFunction": "VectorFieldRenderer",
"rasterFunctionArguments": {
"MagnitudeBandID": <MagnitudeBandID>,
"DirectionBandID": <DirectionBandID>,
"IsUVComponents": <true | false>, //bool
"ReferenceSystem": <ReferenceSystem>, //int 1=Arithmetic, 2= Angular
"MassFlowAngleRepresentation": <representation>, //int 0=from 1 =to
"SymbolTileSize": <size>,
"SymbolTileSizeUnits": <units>,
"CalculationMethod": "<CalculationMethod>" //"Vector Average", "Nearest neighbor", "Bilinear", "Cubic", "Minimum", "Maximum" |
"SymbologyName": "<SymbologyName>", //"Simple Scalar", "Single Arrow", "Wind Barb", "Beaufort Wind (Knots)", "Beaufort Wind (MetersPerSecond)", "Ocean Current (Knots)", "Ocean Current (MetersPerSecond)." |
"MinimumMagnitude": <MinimumMagnitude>,
"MaximumMagnitude": <MaximumMagnitude>,
"MinimumSymbolSize": <MinimumSymbolSize>,
"MaximumSymbolSize": <MaximumSymbolSize>,
"Raster": <Raster> //optional
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
Example
{
"rasterFunction": "VectorFieldRenderer",
"rasterFunctionArguments": {
"MagnitudeBandID": 0,
"DirectionBandID": 1,
"IsUVComponents": true,
"ReferenceSystem": 1,
"MassFlowAngleRepresentation": 0,
"SymbolTileSize": 50,
"SymbolTileSizeUnits": 100,
"CalculationMethod": "Vector Average",
"SymbologyName": "Single Arrow",
"MinimumMagnitude": 1,
"MaximumMagnitude": -1,
"MinimumSymbolSize": 20,
"MaximumSymbolSize": 80,
"Raster": <Raster> //optional
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Raster"
}
"rasterFunction": "WeightedOverlay"
The WeightedOverlay function allows you to overlay several rasters using a common measurement scale and weights each according to its importance. For more information, see Weighted Overlay function.

At 10.5, you must license your ArcGIS Server as ArcGIS Server 10.9.1 Enterprise Advanced or ArcGIS Image Server to use this resource. At versions prior to 10.5, the hosting ArcGIS Server needs to have a Spatial Analyst license.
The arguments for the WeightedOverlay function from 10.5.1 onward are as follows:
{
"rasterFunction": "WeightedOverlay",
"rasterFunctionArguments": {
"Rasters": [<raster1>,<raster2>,...], //array of rasters.
"Fields": ["<field1>","<field2>",...], //[string, string, ...]
"Influences": [<influence1>,<influence2>,...], //[double, double, ...]
"Remaps": ["<remap1>","<remap2>",...], //array of strings ["oldVal11 newVal11, oldVal12 newVal12, ...", "oldVal21 newVal21, oldVal22 newVal22, ...", ...]
"EvalFrom": <evalfrom>, //required, numeric value of evaluation scale from
"EvalTo": <evalto> //required, numeric value of evaluation scale to
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Rasters" //optional
}
Example
{
"rasterFunction": "WeightedOverlay",
"rasterFunctionArguments": {
"Rasters": ["$$","$$","$$"],
"Fields": ["Value","Value","Value"],
"Influences": [0.5,0.2,0.3],
"Remaps": ["0 1, 1 1, 5 5", "1 1, 5 5, 10 NODATA", "0 1, 1 1, 9 9, NODATA -1"]
"EvalFrom": -1,
"EvalTo": 9
}
}
"rasterFunction": "WeightedSum"
The WeightedSum function allows you to overlay several rasters, multiplying each by their given weight and summing them together. For more information, see Weighted Sum function.

At 10.5, you must license your ArcGIS Server as ArcGIS Server 10.9.1 Enterprise Advanced or ArcGIS Image Server to use this resource. At versions prior to 10.5, the hosting ArcGIS Server needs to have a Spatial Analyst license.
The arguments for the WeightedSum function from 10.5.1 onward are as follows:
{
"rasterFunction": "WeightedSum",
"rasterFunctionArguments": {
"Rasters": [<raster1>,<raster2>,...], //array of rasters.
"Fields": ["<field1>","<field2>",...], //[string, string, ...]
"Weights": [<weight1>,<weight2>,...], //[double, double, ...]
"MatchVariable": <true|false>, //new at 10.9, boolean, optional, default is true
"UnionDimension": <true|false> //new at 10.9, boolean, optional, default is true
},
"outputPixelType": "<outputPixelType>", //optional
"variableName": "Rasters" //optional
}
Example 1
{
"rasterFunction": "WeightedSum",
"rasterFunctionArguments": {
"Rasters": ["$$","$$","$$"],
"Fields": ["Value","Value","Value"],
"Weights": [0.25,0.25,0.5]
}
}
Example 2
{
"rasterFunction": "WeightedSum",
"rasterFunctionArguments": {
"Rasters": ["$$","$$","$$"],
"Fields": ["Value","Value","Value"],
"Weights": [0.25,0.25,0.5]
"MatchVariable": false,
"UnionDimension": true
}
}
Using a raster function template defined by the service
The name of the raster function template is displayed in the image service root resource. Function arguments are optional; argument names and default values are created by the author of the raster function template and are not known through REST. A client can simply provide the name of the raster function template only (to the RasterFunction property) or, optionally, provide arguments to overwrite the default values.
For more information about authoring server-side raster function templates, see Server-side raster functions.
{
"rasterFunction": "rasterFunctionTemplateName",
"rasterFunctionArguments": {
"ArgumentName1": <>, //overwrite default value of ArgumentName1, type and default value are defined by the author of the template
"ArgumentName2": <>, //overwrite default value of ArgumentName2, type and default value are defined by the author of the template
...
},
"variableName": "<>" //variableName can be other than "Raster", as defined by the author of the template
}
Example
The following service has raster function templates defined:
http://sampleserver6.arcgisonline.com/arcgis/rest/services/CharlotteLAS/ImageServer?f=pjson
The root resource will advertise supported raster function templates.
"rasterFunctionInfos": [
{
"name": "None",
"description": "A No-Op Function.",
"help": ""
},
{
"name": "RFTAspectColor",
"description": "A raster function template.",
"help": "This raster function template contains the following processing: aspect, remap, colormap and colormap to RGB functions. The remap function remaps divide 0 to 90 evenly to 8 directions, (N,NE,E,SE,S,SW,W,NW). The colormap function used the following colormap for the 8 categories: [[0 176 176 176], [1 255 0 0],[2 255 166 0],[3 255 255 0],[4 0 255 0],[5 0 255 255],[6 0 166 255],[7 0 0 255],[8 255 0 255]]. To overwrite the default setting, use InputRanges (double array), NoDataRanges (double array), and OutputValues (int array) for remapping, and use Colormap to change colors."
},
{
"name": "RFTShadedReliefElevationColorRamp",
"description": "A raster function template.",
"help": "This raster function template uses a shaded relief function. The default values of ZFactor is 1, Altitude is 45, and Azimuth is 315. An elevation colorramp is used."
}
]
A client can use this function with default function arguments.
{
"rasterFunction": "RFTShadedReliefElevationColorRamp"
}
A client can also provide optional parameter values.
{
"rasterFunction": "RFTShadedReliefElevationColorRamp",
"rasterFunctionArguments": {
"ZFactor": 10
},
"variableName": "Raster"
}
Turning off a default raster function template
By default, the image service exportImage operation applies the first raster function template in its rasterFunctionInfos. You can use a different rendering rule by using the renderingRule parameter, or apply no additional processing by using the following rendering rule:
{
"rasterFunction": "None",
}
The following service has a Stretch function template applied by default (TorontoStretch):
It can be turned off by specifying None as the raster function.
When a single-band image service has a raster attribute table and Red, Green, Blue colors are available in the attribute table, exportImage will automatically use it to render an image service by default, for example (NLCDLandCover2001):
It can be turned off the same way:
If the first raster function template is None, it means, by default, no raster function template is used. The image service can use a default renderer if needed (for example, the previous NLCDLandCover2001 example).
Defining a raster function template on the client side
This was added at 10.2. A client can define a raster function template by assigning a well-known raster function object as the value of a raster function argument. The argument needs to take a raster as input, for example, Raster, DEM.
{
"rasterFunction": "<rasterFunctionName>",
"rasterFunctionArguments": {
"argument1": <value1>,
"argument2": <value2>,
"argumentn": <valuen>,
"Raster": { //this is the argument that takes raster inputs, e.g. DEM for the Hillshade function
"rasterFunction": "<rasterFunctionName>",
"rasterFunctionArguments": {
"argument1": <value1>,
"argument2": <value2>,
"argumentn": <valuen>
},
"outputPixelType": "<outputPixelType>",
"variableName": "<variableName>" //the inner function's variableName
}
},
"outputPixelType": "<outputPixelType>",
}
Example
Below is an example that demonstrates red and blue color mapping for a temperature image service (above or below 0° C).
{
"rasterFunction": "Colormap",
"rasterFunctionArguments": {
"Colormap": [
[0, 255, 0, 0],
[2, 0, 0, 255]
],
"Raster": {
"rasterFunction": "Remap",
"rasterFunctionArguments": {
"InputRanges": [-50.0,0, 0, 50],
"OutputValues": [0,2],
"Raster": "$$"
},
"outputPixelType": "U8"
}
},
"outputPixelType": "U8"
}
Using rasters in rendering rules
The variableName of a rendering rule designates which argument has a type of raster (or rasters). It's optional for the following cases:
- Well-known functions, as the image service can find them based on the raster function name.
- For service-defined raster function templates that use Raster or Rasters as the variableName.
Among the raster function arguments, there's one or more arguments that take a raster or an array of rasters as input, for example, the Raster argument for the Remap function and the DEM argument for the Hillshade function. A raster value can be the image service ("$$") -- default, an image in the image service ("$oid"), or a result from another function (a rendering rule object). The argument name value pair can be optional in the following cases, and when not provided by the user, the default is the image service ("Raster":"$$"):
- Well-known functions, for functions that use Raster or DEM as the argument name.
- For service-defined raster function templates if the argument name is Raster. Otherwise, the user needs to provide it.
The ability to reference an image in an image service or the result from another function are available. When using an individual raster in an image service as input, the raster argument needs to be part of rasterFunctionArguments. The value of this argument is a dollar-objectid notation of the raster, for example, "Raster":"$1"). When using the image service as input, you can also use "$$" to represent the image service as part of rasterFunctionArguments (for example, "Raster":"$$").
Example 1 (Stretching the first raster)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 3,
"NumberOfStandardDeviations": 2.5,
"Statistics": [
[0, 255, 56.7, 54.8],
[0, 255, 97.5, 94.5],
[0, 255, 87.5, 87.3]
],
"Gamma": [1.25, 1.25, 1.25],
"Raster": "$1"
},
"outputPixelType": "U8"
}
Example 2 (Stretching the service)
{
"rasterFunction": "Stretch",
"rasterFunctionArguments": {
"StretchType": 3,
"NumberOfStandardDeviations": 2.5,
"Statistics": [
[0, 255, 56.7, 54.8],
[0, 255, 97.5, 94.5],
[0, 255, 87.5, 87.3]
],
"Gamma": [1.25, 1.25, 1.25],
"Raster": "$$"
},
"outputPixelType": "U8"
}