rasterFunctionUtils

AMD: require(["esri/layers/support/rasterFunctionUtils"], (rasterFunctionUtils) => { /* code goes here */ });
ESM: import * as rasterFunctionUtils from "@arcgis/core/layers/support/rasterFunctionUtils.js";
Object: esri/layers/support/rasterFunctionUtils
Since: ArcGIS Maps SDK for JavaScript 4.28
beta

Various utility functions that create RasterFunction for imagery processing. Utility methods in this module makes the raster function generations easier when applying raster functions to ImageryLayer and ImageryTileLayer.

Property Overview

Name Type Summary Object
"$$"

A token representing the image service raster.

rasterFunctionUtils

Property Details

defaultRaster

Property
defaultRaster "$$"readonly

A token representing the image service raster.

Method Overview

Name Return Type Summary Object
RasterFunction

Creates a raster function that calculates the absolute value of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the inverse cosine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the inverse hyperbolic cosine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the inverse sine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the inverse hyperbolic sine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a Aspect function to identify the downslope direction of the maximum rate of change in value from each cell to its neighbors.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the inverse tangent of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the inverse tangent (based on x,y) of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the inverse hyperbolic tangent of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate BAI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate CIg.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate CIre.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate ClayMinerals.

rasterFunctionUtils
RasterFunction

Creates a custom Band Arithmetic function.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate EVI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate FerrousMinerals.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate GEMI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate GNDVI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate GVITM.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate IronOxide.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate MNDWI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate MSAVI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate MTVI2.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate NBR.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate NDBI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate NDMI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate NDSI.

rasterFunctionUtils
RasterFunction

Creates a NDVI function.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate NDVIre.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate NDWI.

rasterFunctionUtils
RasterFunction

CCreates a Band Arithmetic function to calculate PVI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate RTVICore.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate SAVI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate SR.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate SRre.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate Sultan index.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate TSAVI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate VARI.

rasterFunctionUtils
RasterFunction

Creates a Band Arithmetic function to calculate WNDWI.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Bitwise And operation on the binary values of two input rasters.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Bitwise Left Shift operation on the binary values of two input rasters.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Bitwise Not (complement) operation on the binary value of an input raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Bitwise Or operation on the binary values of two input rasters.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Bitwise Right Shift operation on the binary values of two input rasters.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Bitwise Xor operation on the binary values of two input rasters.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Boolean And operation on the pixel values of two input rasters See Boolean And function.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Boolean Not (complement) operation on the pixel values of the input raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Boolean Or operation on the pixel values of two input rasters See Boolean Or function.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a Boolean Xor operation on the pixel values of two input rasters See Boolean Xor function.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates a statistic from multiple rasters, on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Extracts a portion of an image based on an extent or a polygon geometry.

rasterFunctionUtils
RasterFunction

Creates a Colormap function to define a colormap for a raster by specifying a corresponding color for each pixel value.

rasterFunctionUtils
RasterFunction

Creates a Composite Bands function to combine multiple inputs into one multiband raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that sets the truthy pixels (value is not 0) to the pixel value from a true raster, and falsy pixels (value is 0) to the pixel value of the false raster.

rasterFunctionUtils
RasterFunction

Creates a Contrast And Brightness function that enhances the appearance of raster data by modifying the brightness and contrast within the image.

rasterFunctionUtils
RasterFunction

Creates a Convolution function that performs filtering using the given kernel to enhance the image, e.g.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the cosine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the hyperbolic cosine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a Curvature function that calculates the shape or curvature of the slope.

rasterFunctionUtils
RasterFunction

Creates a raster function that divides the values of two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs an equal-to operation on two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the base e exponential of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the base 2 exponential of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the base 10 exponential of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates an Extract Band function to extract one or more bands from a multiband raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that converts each pixel value of a raster into a floating-point representation.

rasterFunctionUtils
RasterFunction

Converts a multiband image into a single-band grayscale image.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a relational greater-than operation on two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a relational greater-than-or-equal-to operation on two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that converts each pixel value of a raster to an integer by truncation.

rasterFunctionUtils
RasterFunction

Creates a raster function that determines which values from the input raster are NoData on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a relational less-than operation on two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a relational less-than-or-equal-to operation on two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the natural logarithm (base e) of each pixel in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the base 2 logarithm of each pixel in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the base 10 logarithm of each pixel in a raster.

rasterFunctionUtils
RasterFunction

Creates a Mask function to specify one or more NoData values, or a range of valid pixel values, to be removed from an output raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that subtracts the value of the second input raster from the value of the first input raster on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that finds the remainder (modulo) of the first raster when divided by the second raster on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that finds the changes the sign (multiplies by -1) of the pixel values of the input raster on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that performs a relational not-equal-to operation on two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that adds (sums) the values of two rasters on a pixel-by-pixel basis.

rasterFunctionUtils
RasterFunction

Creates a raster function that raises the pixel values in a raster to the power of the values found in another raster.

rasterFunctionUtils
RasterFunction

Creates a Remap function to change or reclassify the pixel values of the raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that returns the next lower integer, as a floating-point value, for each pixel in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that returns the next higher integer, as a floating-point value, for each pixel in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that sets the truthy pixels (value is not 0) to NoData, and falsy pixels (value is 0) to the pixel value of the false raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the sine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the hyperbolic sine of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a Slope function that calculates the rate of change of elevation for each digital elevation model (DEM) cell.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the square root of the pixel values in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the square of the pixel values in a raster.

rasterFunctionUtils
RasterFunction

Creates a Statistics function that calculates focal statistics for each pixel of an image based on a defined focal neighborhood.

rasterFunctionUtils
RasterFunction

Creates a Statistics And Histogram function to define the statistics and histogram of a raster.

rasterFunctionUtils
RasterFunction

Creates a Stretch function using min-max stretch type.

rasterFunctionUtils
RasterFunction

Creates a Stretch function using percent-clip stretch type.

rasterFunctionUtils
RasterFunction

Creates a Stretch function using standard-deviation stretch type.

rasterFunctionUtils
RasterFunction

Creates a Stretch function without a specific stretch method.

rasterFunctionUtils
RasterFunction

Creates an Attribute Table function to specify an attribute table for the input categorical raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the tangent of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that calculates the hyperbolic tangent of the pixels in a raster.

rasterFunctionUtils
RasterFunction

Creates a raster function that multiplies the values of two rasters on a pixel-by-pixel basis.

rasterFunctionUtils

Method Details

abs

Method
abs(parameters){RasterFunction}

Creates a raster function that calculates the absolute value of the pixels in a raster. See Abs function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.abs({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

acos

Method
acos(parameters){RasterFunction}

Creates a raster function that calculates the inverse cosine of the pixels in a raster. See ACos function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.acos({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

acosh

Method
acosh(parameters){RasterFunction}

Creates a raster function that calculates the inverse hyperbolic cosine of the pixels in a raster. See Acosh function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.acosh({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

asin

Method
asin(parameters){RasterFunction}

Creates a raster function that calculates the inverse sine of the pixels in a raster. See ASin function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.asin({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

asinh

Method
asinh(parameters){RasterFunction}

Creates a raster function that calculates the inverse hyperbolic sine of the pixels in a raster. See Asinh function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.asinh({
  raster: rasterFunctionUtils.defaultRaster,
   outputPixelType: "f32"
});

aspect

Method
aspect(parameters){RasterFunction}

Creates a Aspect function to identify 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 are the compass direction of the aspect. See Aspect function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Create aspect from elevation data.
const aspect = rasterFunctionUtils.aspect({});

atan

Method
atan(parameters){RasterFunction}

Creates a raster function that calculates the inverse tangent of the pixels in a raster. See Atan function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.atan({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

atan2

Method
atan2(parameters){RasterFunction}

Creates a raster function that calculates the inverse tangent (based on x,y) of the pixels in a raster. See Atan2 function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.atan2({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

atanh

Method
atanh(parameters){RasterFunction}

Creates a raster function that calculates the inverse hyperbolic tangent of the pixels in a raster. See Atanh function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.atanh({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

bandArithmeticBAI

Method
bandArithmeticBAI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate BAI. The Burn Area Index (BAI) uses the reflectance values in the red and NIR portion of the spectrum to identify the areas of the terrain affected by fire. See BAI raster function.

Equation: BAI = 1/((0.1 -RED) * (0.1 -RED) + (0.06 - NIR) * (0.06 - NIR))

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
redBandId Number

The 0-based red band id.

nirBandId Number

The 0-based near infrared band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
//Creates BAI from a 4-band image whose bands are arranged in BGRI order.
const bai = rasterFunctionUtils.bandArithmeticBAI({
  redBandId: 1,
  nirBandId: 3
});

bandArithmeticCIg

Method
bandArithmeticCIg(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate CIg. Chlorophyll index - Green (CIG) method is a vegetation index for estimating the chlorophyll content in leaves using the ratio of reflectivity in the NIR and green bands. See CIg raster function.

Equation: CIg = (NIR / Green)-1

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

greenBandId Number

The 0-based green band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates CI (green) from a 4-band image whose bands are arranged in BGRI order.
const rtviCore = rasterFunctionUtils.bandArithmeticCIg({
  nirBandId: 3,
  greenBandId: 1
});

bandArithmeticCIre

Method
bandArithmeticCIre(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate CIre. The Chlorophyll Index - Red-Edge (CIre) method is a vegetation index for estimating the chlorophyll content in leaves using the ratio of reflectivity in the NIR and red-edge bands. See CIre raster function.

Equation: CIre = (NIR / RedEdge)-1

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

reBandId Number

The 0-based red edge band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates CI (Red-Edge).
const cire = rasterFunctionUtils.bandArithmeticCIre({
  nirBandId: 3,
  reBandId: 4
});

bandArithmeticClayMinerals

Method
bandArithmeticClayMinerals(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate ClayMinerals. The Clay Minerals (clayMinerals) ratio method is a geological index for identifying mineral features containing clay and alunite using two shortwave infrared (SWIR) bands. It is used in mineral composite mapping. See ClayMinerals raster function.

Equation: CM = SWIR1 / SWIR2

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
swir1BandId Number

The 0-based shortwave infrared band id centering around 1.5—1.75µm.

swir2BandId Number

The 0-based shortwave infrared band id centering around 2.08—2.35µm.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
//Creates ClayMinerals index.
const ironOxide = rasterFunctionUtils.bandArithmeticClayMinerals({
  swir1BandId: 6,
  swir2BandId: 7
});

bandArithmeticCustom

Method
bandArithmeticCustom(parameters){RasterFunction}

Creates a custom Band Arithmetic function. ser defined method. When using the user defined method to define your band arithmetic algorithm, you can enter a single-line algebraic formula to create a single-band output. The supported operators are -,+,/,*, and unary -. To identify the bands, add B or b to the beginning of the band number. See Band Arithmetic function.

equation: (b1 - b0) / (b1 + b0)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
bandIndexes String

The custom band index, e.g. (b1 - b0) / (b1 + b0)

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
//Creates a custom band arithmetic index that creates a normalized differential band ratio.
const ndvi = rasterFunctionUtils.bandArithmeticCustom({
  bandIndexes: "(b1 - b0) / (b1 + b0)"
});

bandArithmeticEVI

Method
bandArithmeticEVI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate EVI. The Enhanced Vegetation Index (EVI) method is an optimized vegetation index that accounts for atmospheric influences and vegetation background signal. It's similar to NDVI but is less sensitive to background and atmospheric noise, and it does not become as saturated as NDVI when viewing areas with very dense green vegetation. See EVI raster function.

Equation: EVI = 2.5 * (NIR - Red) / (NIR + 6 * Red - 7.5 * Blue + 1)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

blueBandId Number

The 0-based blue band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates EVI from a 4-band image whose bands are arranged in BGRI order.
const ndvi = rasterFunctionUtils.bandArithmeticEVI({
  nirBandId: 3,
  redBandId: 2,
  blueBandId: 0
});

bandArithmeticFerrousMinerals

Method
bandArithmeticFerrousMinerals(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate FerrousMinerals. The Ferrous Minerals (ferrousMinerals) ratio method is a geological index for identifying rock features containing some quantity of iron-bearing minerals using the SWIR and NIR bands. It is used in mineral composite mapping. See FerrousMinerals raster function.

Equation: FM = SWIR / NIR

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
swir1BandId Number

The 0-based shortwave infrared band id.

nirBandId Number

The 0-based near infrared band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates FerrousMinerals index.
const ironOxide = rasterFunctionUtils.bandArithmeticFerrousMinerals({
  swir1BandId: 6,
  nirBandId: 3
});

bandArithmeticGEMI

Method
bandArithmeticGEMI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate GEMI. The Global Environmental Monitoring Index (GEMI) method is a nonlinear vegetation index for global environmental monitoring from satellite imagery. It's similar to NDVI, but it's less sensitive to atmospheric effects. It is affected by bare soil; therefore, it's not recommended for use in areas of sparse or moderately dense vegetation. See GEMI raster function.

Equation: GEMI = eta * (1 - 0.25 * eta)-((Red - 0.125)/(1 - Red)) eta = (2 * (NIR * NIR - Red * Red) + 1.5 * NIR + 0.5 * Red)/(NIR + Red + 0.5)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates GEMI from a 4-band image whose bands are arranged in BGRI order.
const gemi = rasterFunctionUtils.bandArithmeticGEMI({
  nirBandId: 3,
  redBandId: 2
});

bandArithmeticGNDVI

Method
bandArithmeticGNDVI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate GNDVI. The Green Normalized Difference Vegetation Index (GNDVI) method is a vegetation index for estimating photo synthetic activity and is a commonly used vegetation index to determine water and nitrogen uptake into the plant canopy. See GNDVI raster function.

Equation: GNDVI = (NIR-Green)/(NIR+Green)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

greenBandId Number

The 0-based green band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates GNDVI from a 4-band image whose bands are arranged in BGRI order.
const gndvi = rasterFunctionUtils.bandArithmeticGNDVI({
  nirBandId: 3,
  greenBandId: 1
});

bandArithmeticGVITM

Method
bandArithmeticGVITM(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate GVITM. The Green Vegetation Index (GVI) method was originally designed from Landsat MSS imagery and has been modified for Landsat TM imagery. It's also known as the Landsat TM Tasseled Cap green vegetation index. It can be used with imagery whose bands share the same spectral characteristics. See GVITM raster function.

Equation: GVI = -0.2848 * Band1 - 0.2435 * Band2 - 0.5436 * Band3 + 0.7243 * Band4 + 0.0840 * Band5 - 0.1800 * Band7

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
bandIds Number[]

The bandIds array representing Landsat band 1, 2, 3, 4, 5, 7.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates GVITM from a Landsat TM multispectral scene.
const gvitm = rasterFunctionUtils.bandArithmeticGVITM({
  bandIds: [0, 1, 2, 3, 4, 5]
});

bandArithmeticIronOxide

Method
bandArithmeticIronOxide(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate IronOxide. The Iron Oxide (ironOxide) ratio method is a geological index for identifying rock features that have experienced oxidation of iron-bearing sulfides using the red and blue bands. It is useful in identifying iron oxide features below vegetation canopies and is used in mineral composite mapping. See IronOxide raster function.

Equation: IronOxide = Red / Blue

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
redBandId Number

The 0-based red band id.

blueBandId Number

The 0-based blue band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
//Creates IronOxide from a 4-band image whose bands are arranged in BGRI order.
const ironOxide = rasterFunctionUtils.bandArithmeticIronOxide({
  redBandId: 2,
  blueBandId: 0
});

bandArithmeticMNDWI

Method
bandArithmeticMNDWI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate MNDWI. The Modified Normalized Difference Water Index (MNDWI) uses green and SWIR bands for the enhancement of open water features. It also diminishes built-up area features that are often correlated with open water in other indices.

Equation: MNDWI = (Green - SWIR) / (Green + SWIR)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
greenBandId Number

The 0-based green band id.

swirBandId Number

The 0-based shortwave infrared band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates MNDWI.
const mndwi = rasterFunctionUtils.bandArithmeticMNDWI({
  greenBandId: 1,
  swirBandId: 6
});

bandArithmeticMSAVI

Method
bandArithmeticMSAVI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate MSAVI. The Modified Soil Adjusted Vegetation Index (MSAVI) method minimizes the effect of bare soil on the SAVI. See MSAVI raster function.

Equation: MSAVI2 = 0.5 * ((2NIR+1)-sqrt((2NIR+1)(2NIR+1)-8(NIR-Red)))

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates MSAVI from a 4-band image whose bands are arranged in BGRI order.
const msavi = rasterFunctionUtils.bandArithmeticMSAVI({
  nirBandId: 3,
  redBandId: 2
});

bandArithmeticMTVI2

Method
bandArithmeticMTVI2(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate MTVI2. The Modified Triangular Vegetation Index (MTVI2) method is a vegetation index for detecting leaf chlorophyll content at the canopy scale while being relatively insensitive to leaf area index. It uses reflectance in the green, red, and NIR bands. See MTVI2 raster function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

greenBandId Number

The 0-based green band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates MTVI2 from a 4-band image whose bands are arranged in BGRI order.
const mtvi2 = rasterFunctionUtils.bandArithmeticMTVI2({
  nirBandId: 3,
  redBandId: 2,
  greenBandId: 1
});

bandArithmeticNBR

Method
bandArithmeticNBR(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate NBR. The Normalized Burn Ratio Index (NBRI) uses the NIR and SWIR bands to emphasize burned areas, while mitigating illumination and atmospheric effects. Your images should be corrected to reflectance values before using this index. See NBR raster function.

Equation: NBR = (NIR - SWIR) / (NIR+ SWIR)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

swirBandId Number

The 0-based shortwave infrared band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates NBR index.
const nbr = rasterFunctionUtils.bandArithmeticNBR({
  nirBandId: 3,
  swirBandId: 5
});

bandArithmeticNDBI

Method
bandArithmeticNDBI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate NDBI. The Normalized Difference Built-up Index (NDBI) uses the NIR and SWIR bands to emphasize manufactured built-up areas. It is ratio based to mitigate the effects of terrain illumination differences as well as atmospheric effects. See NDBI raster function.

Equation: NDBI = (SWIR - NIR) / (SWIR + NIR)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
swirBandId Number

The 0-based shortwave infrared band id.

nirBandId Number

The 0-based near infrared band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates NDBI index.
const ndbi = rasterFunctionUtils.bandArithmeticNDBI({
  nirBandId: 3,
  swirBandId: 5
});

bandArithmeticNDMI

Method
bandArithmeticNDMI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate NDMI. The Normalized Difference Moisture Index (NDMI) is sensitive to the moisture levels in vegetation. It is used to monitor droughts and fuel levels in fire-prone areas. It uses NIR and SWIR bands to create a ratio designed to mitigate illumination and atmospheric effects. See NDMI raster function.

Equation: NDMI = (NIR - SWIR1)/(NIR + SWIR1)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

swirBandId Number

The 0-based shortwave infrared band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates NDMI index.
const ndmi = rasterFunctionUtils.bandArithmeticNDMI({
  nirBandId: 3,
  swirBandId: 5
});

bandArithmeticNDSI

Method
bandArithmeticNDSI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate NDSI. The Normalized Difference Snow Index (NDSI) is designed to use MODIS (band 4 and band 6) and Landsat TM (band 2 and band 5) for identification of snow cover while ignoring cloud cover. Since it is ratio based, it also mitigates atmospheric effects. See NDSI raster function.

Equation: NDSI = (Green - SWIR) / (Green + SWIR)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
greenBandId Number

The 0-based green band id.

swirBandId Number

The 0-based shortwave infrared band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Calculates NDSI using Landsat 8.
const ndvi = rasterFunctionUtils.bandArithmeticNDSI({
  greenBandId: 2,
  swirBandId: 5
});

bandArithmeticNDVI

Method
bandArithmeticNDVI(parameters){RasterFunction}

Creates a NDVI function. The Normalized Difference Vegetation Index (NDVI) method is a standardized index allowing 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 NIR band.

Equation: NDVI = ((NIR - Red)/(NIR + Red))

See NDVI function and NDVI.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

scientificOutput Boolean
optional

Output values are linearly scaled to 0 to 200 when scientificOutput is false. Default is true.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates NDVI from a 4-band image whose bands are arranged in BGRI order.
const ndvi = rasterFunctionUtils.bandArithmeticNDVI({
  nirBandId: 3,
  redBandId: 2
});
const colormap = rasterFunctionUtils.colormap({
  colorRampName: "NDVI3",
  raster: ndvi
});
layer.rasterFunction = colormap;

bandArithmeticNDVIre

Method
bandArithmeticNDVIre(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate NDVIre. The Red-Edge NDVI (NDVIre) method is a vegetation index for estimating vegetation health using the red-edge band. It is especially useful for estimating crop health in the mid to late stages of growth, when the chlorophyll concentration is relatively higher. Also, NDVIre can be used to map the within-field variability of nitrogen foliage to understand the fertilizer requirements of crops. See NDVIre raster function.

Equation: NDVIre = (NIR - RedEdge)/(NIR + RedEdge)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

reBandId Number

The 0-based red edge band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates NDVI (rededge).
const ndvire = rasterFunctionUtils.bandArithmeticNDVIre({
  nirBandId: 3,
  reBandId: 4
});

bandArithmeticNDWI

Method
bandArithmeticNDWI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate NDWI. The Normalized Difference Water Index (NDWI) method is an index for delineating and monitoring content changes in surface water. It is computed with the NIR and green bands. See NDWI raster function.

Equation: NDWI = (Green - NIR) / (Green + NIR)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

greenBandId Number

The 0-based green band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates NDWI from a 4-band image whose bands are arranged in BGRI order.
const ndwi = rasterFunctionUtils.bandArithmeticNDWI({
  nirBandId: 3,
  greenBandId: 1
});

bandArithmeticPVI

Method
bandArithmeticPVI(parameters){RasterFunction}

CCreates a Band Arithmetic function to calculate PVI. The Transformed Soil Adjusted Vegetation Index (TSAVI) method is a vegetation index that minimizes soil brightness influences by assuming the soil line has an arbitrary slope and intercept. See PVI raster function.

Equation: PVI = (NIR - a * Red - b) / (sqrt(1 + a*a)) a = slope of the soil line b = gradient of the soil line

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

slope Boolean
optional

The soil line slope. Default is 0.3.

gradient Boolean
optional

The soil line gradient. Default is 0.5.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates PVI from a 4-band image whose bands are arranged in BGRI order.
const pvi = rasterFunctionUtils.bandArithmeticPVI({
  nirBandId: 3,
  redBandId: 2,
  slope: 0.3,
  gradient: 0.5
});

bandArithmeticRTVICore

Method
bandArithmeticRTVICore(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate RTVICore. The Red-Edge Triangulated Vegetation Index (RTVICore) method is a vegetation index for estimating leaf area index and biomass. This index uses reflectance in the NIR, red-edge, and green spectral bands. See RTVICore raster function.

Equation: RTVICore = 100 * (NIR - RedEdge) - 10 * (NIR - Green)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

reBandId Number

The 0-based red edge band id.

greenBandId Number

The 0-based green band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates RTVICore from a 4-band image whose bands are arranged in BGRI order.
const rtviCore = rasterFunctionUtils.bandArithmeticRTVICore({
  nirBandId: 3,
  redBandId: 2,
  greenBandId: 1
});

bandArithmeticSAVI

Method
bandArithmeticSAVI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate SAVI. The Soil-Adjusted Vegetation Index (SAVI) method is a vegetation index that attempts to minimize soil brightness influences using a soil-brightness correction factor. This is often used in arid regions where vegetative cover is low, and it outputs values between -1.0 and 1.0.

Equation: SAVI = ((NIR - Red) / (NIR + Red + L)) x (1 + L)

L = The amount of green vegetation cover

See SAVI raster function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

factor Boolean
optional

The amount of green vegetation cover from 0 to 1. Default is 0.33.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates SAVI from a 4-band image whose bands are arranged in BGRI order.
const index = rasterFunctionUtils.bandArithmeticSAVI({
  nirBandId: 3,
  redBandId: 2,
  factor: 0.33
});

bandArithmeticSR

Method
bandArithmeticSR(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate SR. The Simple Ratio (SR) method is a common vegetation index for estimating the amount of vegetation. It is the ratio of light scattered in the NIR and absorbed in red bands, which reduces the effects of atmosphere and topography. See SR raster function.

Equation: SR = NIR / Red

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates SR from a 4-band image whose bands are arranged in BGRI order.
const sr = rasterFunctionUtils.bandArithmeticSR({
  nirBandId: 3,
  redBandId: 2
});

bandArithmeticSRre

Method
bandArithmeticSRre(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate SRre. The Red-Edge Simple Ratio (SRre) method is a vegetation index for estimating the amount of healthy and stressed vegetation. It is the ratio of light scattered in the NIR and red-edge bands, which reduces the effects of atmosphere and topography. See SRre raster function.

Equation: SRre = NIR / RedEdge

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

reBandId Number

The 0-based red edge band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates SR (rededge).
const srre = rasterFunctionUtils.bandArithmeticSRre({
  nirBandId: 3,
  reBandId: 4
});

bandArithmeticSultan

Method
bandArithmeticSultan(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate Sultan index. Creates a BandArithmetic function.The Sultan's process takes a six-band 8-bit image and uses the Sultan's Formula method to produce a three-band 8-bit image. The resulting image highlights rock formations called ophiolites on coastlines. This formula was designed based on the TM or ETM bands of a Landsat 5 or 7 scene.

See Sultan raster function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
bandIds Number[]

The bandIds array representing band 1, 3, 4, 5, 6.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates Sultan 3 band output from a 6-band Landsat TM multispectral scene.
const sultan = rasterFunctionUtils.bandArithmeticSultan({
  bandIds: [0, 2, 3, 4, 5]
});

bandArithmeticTSAVI

Method
bandArithmeticTSAVI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate TSAVI. The Transformed Soil Adjusted Vegetation Index (TSAVI) method is a vegetation index that minimizes soil brightness influences by assuming the soil line has an arbitrary slope and intercept. See TSAVI raster function.

Equation: TSAVI = (s * (NIR - s * Red - a)) / (a * NIR + Red - a * s + X * (1 + s * s)) s = the soil line slope a = the soil line intercept X = an adjustment factor that is set to minimize soil noise

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
nirBandId Number

The 0-based near infrared band id.

redBandId Number

The 0-based red band id.

slope Boolean
optional

The soil line slope. Default is 0.33.

intercept Boolean
optional

The soil line intercept. Default is 0.5.

factor Boolean
optional

The adjustment factor to minimize soil noise. Default is 1.5.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates TSAVI from a 4-band image whose bands are arranged in BGRI order.
const tsavi = rasterFunctionUtils.bandArithmeticTSAVI({
  nirBandId: 3,
  redBandId: 2,
  slope: 0.33,
  intercept: 0.5,
  factor: 1.5
});

bandArithmeticVARI

Method
bandArithmeticVARI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate VARI. The Visible Atmospherically Resistant Index (VARI) method is a vegetation index for estimating vegetation fraction quantitatively with only the visible range of the spectrum. See VARI raster function.

Equation: VARI = (Green - Red) / (Green + Red – Blue)

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
redBandId Number

The 0-based red band id.

greenBandId Number

The 0-based green band id.

blueBandId Number

The 0-based blue band id.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates VARI from a typical drone image.
const index = rasterFunctionUtils.bandArithmeticVARI({
  redBandId: 0,
  greenBandId: 1,
  blueBandId: 2
});

bandArithmeticWNDWI

Method
bandArithmeticWNDWI(parameters){RasterFunction}

Creates a Band Arithmetic function to calculate WNDWI. The Weighted Normalized Difference Water Index (WNDWI) method is a water index developed to reduce errors typically encountered in other water indices, including water turbidity, small water bodies, or shadow in remote sensing scenes.

Equation: WNDWI = [Green – α * NIR – (1 – α) * SWIR ] / [Green + α * NIR + (1 – α) * SWIR]

where a is weighted coefficient ranging from 0 to 1.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
greenBandId Number

The 0-based green band id.

nirBandId Number

The 0-based near infrared band id.

swirBandId Number

The 0-based shortwave infrared band id.

alpha Number
optional

A weighted coefficient ranging from 0 to 1. Default is 0.5.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates WNDWI.
const wndwi = rasterFunctionUtils.bandArithmeticWNDWI({
  greenBandId: 1,
  nirBandId: 3,
  swirBandId: 6
});

bitwiseAnd

Method
bitwiseAnd(parameters){RasterFunction}

Creates a raster function that performs a Bitwise And operation on the binary values of two input rasters. See Bitwise And function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.bitwiseAnd({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

bitwiseLeftShift

Method
bitwiseLeftShift(parameters){RasterFunction}

Creates a raster function that performs a Bitwise Left Shift operation on the binary values of two input rasters. See Bitwise Left Shift function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.bitwiseLeftShift({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

bitwiseNot

Method
bitwiseNot(parameters){RasterFunction}

Creates a raster function that performs a Bitwise Not (complement) operation on the binary value of an input raster. See Bitwise Not function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.bitwiseNot({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "s16"
});

bitwiseOr

Method
bitwiseOr(parameters){RasterFunction}

Creates a raster function that performs a Bitwise Or operation on the binary values of two input rasters. See Bitwise Or function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.bitwiseOr(
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

bitwiseRightShift

Method
bitwiseRightShift(parameters){RasterFunction}

Creates a raster function that performs a Bitwise Right Shift operation on the binary values of two input rasters. See Bitwise Right Shift function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.bitwiseRightShift({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

bitwiseXor

Method
bitwiseXor(parameters){RasterFunction}

Creates a raster function that performs a Bitwise Xor operation on the binary values of two input rasters. See Bitwise Xor function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.bitwiseXor({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

booleanAnd

Method
booleanAnd(parameters){RasterFunction}

Creates a raster function that performs a Boolean And operation on the pixel values of two input rasters See Boolean And function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.booleanAnd({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

booleanNot

Method
booleanNot(parameters){RasterFunction}

Creates a raster function that performs a Boolean Not (complement) operation on the pixel values of the input raster. See Boolean Not function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.booleanNot({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "u8"
});

booleanOr

Method
booleanOr(parameters){RasterFunction}

Creates a raster function that performs a Boolean Or operation on the pixel values of two input rasters See Boolean Or function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.booleanOr({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

booleanXor

Method
booleanXor(parameters){RasterFunction}

Creates a raster function that performs a Boolean Xor operation on the pixel values of two input rasters See Boolean Xor function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.booleanXor({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

cellStatistics

Method
cellStatistics(parameters){RasterFunction}

Creates a raster function that calculates a statistic from multiple rasters, on a pixel-by-pixel basis. The available statistics are majority, maximum, mean, median, minimum, minority, percentile, range, standard deviation, sum, and variety. See Cell Statistics function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification

The input rasters.

statType String

The true raster, if the first input is a raster.

Possible Values:"min"|"max"|"majority"|"mean"|"minority"|"range"|"stddev"|"sum"|"variety"|"median"

processAsMultiband Boolean
optional

When true, process the single input raster as multiple bands. Default is true.

outputPixelType String
optional

The output pixel type. Default is unknown (determined by input data).

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.conditional({
  rasters: [rasterFunctionUtils.defaultRaster],
  statType: "majority",
  processAsMultiband: true
});

clip

Method
clip(parameters){RasterFunction}
Since: ArcGIS Maps SDK for JavaScript 4.29 rasterFunctionUtils since 4.28, clip added at 4.29.

Extracts a portion of an image based on an extent or a polygon geometry. The clip output includes any pixels that intersect the clip geometry.

Parameters
Specification
parameters Object

The clip parameters object has the following properties.

Specification
geometry Polygon|Extent

An extent or a polygon geometry to define the clip shape.

keepOutside Boolean
optional

When false, the imagery within the clip geometry will be kept in the output. When true, imagery outside of the clip geometry will be kept and the imagery inside the clip geometry will be discarded.

outputPixelType String
optional
Default Value: "unknown"

The output pixel type.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Clips image using user specifed extent and keeps the image that is inside the extent.
layer.rasterFunction = rasterFunctionUtils.clip({
  geometry: extent,
  keepOutside: false
});

colormap

Method
colormap(parameters){RasterFunction}

Creates a Colormap function to define a colormap for a raster by specifying a corresponding color for each pixel value. See Colormap function.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Examples
// Creates a colormap to map pixel value 0 to red and 10 to green.
const colormap = rasterFunctionUtils.colormap({
  colormap: [
    [0, 255, 0, 0],
    [10, 0, 255, 0]
  ]
});
// Creates a colormap to map pixel value 0 to red and 10 to green.
const colormap = rasterFunctionUtils.colormap({
  colormap: [
    {value: 0, color: "red"},
    {value: 10, color: "green"}
  ]
});
// Creates a colormap to map pixel value 0 to red and 10 to green.
const colormap = rasterFunctionUtils.colormap({
  colormap: [
    {value: 0, color: "#FF0000"},
    {value: 10, color: "#00FF00"}
  ]
});
// Creates a colormap to map pixel value using a named colorramp
const colormap = rasterFunctionUtils.colormap({
  colorRampName: "red-to-green"
});

compositeBands

Method
compositeBands(parameters){RasterFunction}

Creates a Composite Bands function to combine multiple inputs into one multiband raster. See Composite Bands function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.

conditional

Method
conditional(parameters){RasterFunction}

Creates a raster function that sets the truthy pixels (value is not 0) to the pixel value from a true raster, and falsy pixels (value is 0) to the pixel value of the false raster. See Con function.

Parameter

The conditional parameters object.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.conditional({
  raster: rasterFunctionUtils.defaultRaster,
  trueRaster: 100,
  falseRaster: 10,
  outputPixelType: "u8"
});

contrastBrightness

Method
contrastBrightness(parameters){RasterFunction}

Creates a Contrast And Brightness function that enhances the appearance of raster data by modifying the brightness and contrast within the image. See Contrast And Brightness function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
contrastOffset Number

Contrast offset from -100 to 100.

brightnessOffset Number

Brightness offset from -100 to 100.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.contrastBrightness({
  contrastOffset: 10,
  brightnessOffset: 8
});

convolution

Method
convolution(parameters){RasterFunction}

Creates a Convolution function that performs filtering using the given kernel to enhance the image, e.g. sharpening an image, blurring an image, and detecting edges et al. See Convolution function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
convolutionType String

Choose a predefined kernel.

Possible Values:"user-defined"|"line-detection-horizontal"|"line-detection-vertical"|"line-detection-left-diagonal"|"line-detection-right-diagonal"|"gradient-north"|"gradient-west"|"gradient-east"|"gradient-south"|"gradient-north-east"|"gradient-north-west"|"smooth-arithmetic-mean"|"smoothing3x3"|"smoothing5x5"|"sharpening3x3"|"sharpening5x5"|"laplacian3x3"|"laplacian5x5"|"sobel-horizontal"|"sobel-vertical"|"sharpen"|"sharpen2"|"point-spread"|"none"

rows Number
optional

The number of rows, only needed for user-defined kernel.

cols Number
optional

The number of columns, only needed for user-defined kernel

kernel Number[]
optional

The kernel size of rows x columns arranged in row-major order.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Sharpen the image
layer.rasterFunction = rasterFunctionUtils.convolution({
  convolutionType: "sharpen"
});

cos

Method
cos(parameters){RasterFunction}

Creates a raster function that calculates the cosine of the pixels in a raster. See Cos function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.cos({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

cosh

Method
cosh(parameters){RasterFunction}

Creates a raster function that calculates the hyperbolic cosine of the pixels in a raster. See Cosh function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.cosh({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

curvature

Method
curvature(parameters){RasterFunction}

Creates a Curvature function that calculates 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. See Curvature function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
curvatureType String

The curvature type

Possible Values:"standard"|"platform"|"profile"

zFactor Number

A ratio of z unit / xy unit, with optional exaggeration factored in.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Create curvature from elevation data.
const slope = rasterFunctionUtils.curvature({
  curvatureType: "standard",
  zFactor: 1
});

divide

Method
divide(parameters){RasterFunction}

Creates a raster function that divides the values of two rasters on a pixel-by-pixel basis. See Divide function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.divide({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

equalTo

Method
equalTo(parameters){RasterFunction}

Creates a raster function that performs an equal-to operation on two rasters on a pixel-by-pixel basis. See Equal To function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.equalTo({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

exp

Method
exp(parameters){RasterFunction}

Creates a raster function that calculates the base e exponential of the pixels in a raster. See Exp function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.exp({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

exp2

Method
exp2(parameters){RasterFunction}

Creates a raster function that calculates the base 2 exponential of the pixels in a raster. See Exp2 function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.exp2({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

exp10

Method
exp10(parameters){RasterFunction}

Creates a raster function that calculates the base 10 exponential of the pixels in a raster. See Exp10 function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.exp10({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

extractBand

Method
extractBand(parameters){RasterFunction}

Creates an Extract Band function to extract one or more bands from a multiband raster. To use bandNames or bandWavelengths, the data source must have corresponding key properties information. See Extract Band function.

Parameters
Specification

The parameters object.

Specification
optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Creates a false color composite from a Landsat TM multispectral image.
const nrg = rasterFunctionUtils.extractBand({
  bandIds: [3, 2, 1]
});

const nrg = rasterFunctionUtils.extractBand({
  bandNames: ["NearInfrared_1", "Red", "Green"]
});

const nrg = rasterFunctionUtils.extractBand({
  bandWavelengths: [800, 650, 550]
});

float

Method
float(parameters){RasterFunction}

Creates a raster function that converts each pixel value of a raster into a floating-point representation. See Float function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.float({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

grayscale

Method
grayscale(parameters){RasterFunction}
Since: ArcGIS Maps SDK for JavaScript 4.29 rasterFunctionUtils since 4.28, grayscale added at 4.29.

Converts a multiband image into a single-band grayscale image. Specified weights are applied to each of the input bands, and normalization is applied to the output image. The weights are often applied because some bands have variable importance depending on the application. For example, the blue band often contains more noise than other bands.

Parameters
Specification
parameters Object

The grayscale parameters object has the following properties.

Specification
weights Number[]

The weights applied to each input band. Weights are often applied because some bands have variable importance depending on the application.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Clips image using user specifed extent and keeps the image that is inside the extent.
layer.rasterFunction = rasterFunctionUtils.grayscale({
  weights: [3, 2, 5]
});

greaterThan

Method
greaterThan(parameters){RasterFunction}

Creates a raster function that performs a relational greater-than operation on two rasters on a pixel-by-pixel basis. See Greater Than function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.greaterThan({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

greaterThanEqual

Method
greaterThanEqual(parameters){RasterFunction}

Creates a raster function that performs a relational greater-than-or-equal-to operation on two rasters on a pixel-by-pixel basis. See Greater Than Equal function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.greaterThanEqual({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

int

Method
int(parameters){RasterFunction}

Creates a raster function that converts each pixel value of a raster to an integer by truncation. See Int function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.int({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "u32"
});

isNull

Method
isNull(parameters){RasterFunction}

Creates a raster function that determines which values from the input raster are NoData on a pixel-by-pixel basis. See Is Null function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.isNull({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "u8"
});

lessThan

Method
lessThan(parameters){RasterFunction}

Creates a raster function that performs a relational less-than operation on two rasters on a pixel-by-pixel basis. See Less Than function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.lessThan({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

lessThanEqual

Method
lessThanEqual(parameters){RasterFunction}

Creates a raster function that performs a relational less-than-or-equal-to operation on two rasters on a pixel-by-pixel basis. See Less Than Equal function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.lessThanEqual({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

log

Method
log(parameters){RasterFunction}

Creates a raster function that calculates the natural logarithm (base e) of each pixel in a raster. See Ln function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.log({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

log2

Method
log2(parameters){RasterFunction}

Creates a raster function that calculates the base 2 logarithm of each pixel in a raster. See Log2 function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.log2({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

log10

Method
log10(parameters){RasterFunction}

Creates a raster function that calculates the base 10 logarithm of each pixel in a raster. See Log10 function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.log10({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

mask

Method
mask(parameters){RasterFunction}

Creates a Mask function to specify one or more NoData values, or a range of valid pixel values, to be removed from an output raster. See Mask function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
includedRanges Number[][]

The included values for each band. Each band is specified using a range [from, to].

noDataValues Number[][]

The nodata values for each band.

noDataInterpretation String
optional

Result is no data if all bands are nodata when match-all is specified, any if any band is nodata when match-any is specified.

Possible Values:"match-any"|"match-all"

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Only show sea surface temperature above 10 degrees.
const warmWater = rasterFunctionUtils.mask({
  includedRanges: [[10, 50]]
});

minus

Method
minus(parameters){RasterFunction}

Creates a raster function that subtracts the value of the second input raster from the value of the first input raster on a pixel-by-pixel basis. See Minus function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.minus({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1,
  outputPixelType: "s16"
});

mod

Method
mod(parameters){RasterFunction}

Creates a raster function that finds the remainder (modulo) of the first raster when divided by the second raster on a pixel-by-pixel basis. See Mod function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.mod({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

negate

Method
negate(parameters){RasterFunction}

Creates a raster function that finds the changes the sign (multiplies by -1) of the pixel values of the input raster on a pixel-by-pixel basis. See Negate function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.negate({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

notEqual

Method
notEqual(parameters){RasterFunction}

Creates a raster function that performs a relational not-equal-to operation on two rasters on a pixel-by-pixel basis. See Not Equal function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.notEqual({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

plus

Method
plus(parameters){RasterFunction}

Creates a raster function that adds (sums) the values of two rasters on a pixel-by-pixel basis. See Plus function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.plus({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 100,
  outputPixelType: "u16"
});

power

Method
power(parameters){RasterFunction}

Creates a raster function that raises the pixel values in a raster to the power of the values found in another raster. See Power function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.power({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

remap

Method
remap(parameters){RasterFunction}

Creates a Remap function to change or reclassify the pixel values of the raster. See Remap function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification

Range maps.

allowUnmatched Boolean
optional

Unmatched pixel values are passed through when true, or set to NoData when false.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Remap costal elevation values into flood risk categories.
const warmWater = rasterFunctionUtils.remap({
  rangeMaps: [
   { range: [-100, 10], output: 0 },
   { range: [10, 1000], output: 200 }
  ]
});

roundDown

Method
roundDown(parameters){RasterFunction}

Creates a raster function that returns the next lower integer, as a floating-point value, for each pixel in a raster. See Round Down function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.roundDown({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "s16"
});

roundUp

Method
roundUp(parameters){RasterFunction}

Creates a raster function that returns the next higher integer, as a floating-point value, for each pixel in a raster. See Round Up function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.roundUp({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "s16"
});

setNull

Method
setNull(parameters){RasterFunction}

Creates a raster function that sets the truthy pixels (value is not 0) to NoData, and falsy pixels (value is 0) to the pixel value of the false raster. See Set Null function.

Parameter
parameters SetNullParameters

The set null parameters object.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.setNull({
  raster: rasterFunctionUtils.defaultRaster,
  falseRaster: 1,
  outputPixelType: "u8"
});

sin

Method
sin(parameters){RasterFunction}

Creates a raster function that calculates the sine of the pixels in a raster. See Sin function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.sin({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

sinh

Method
sinh(parameters){RasterFunction}

Creates a raster function that calculates the hyperbolic sine of the pixels in a raster. See Sinh function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.sinh({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

slope

Method
slope(parameters){RasterFunction}

Creates a Slope function that calculates the rate of change of elevation for each digital elevation model (DEM) cell. It's the first derivative of a DEM. See Slope function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
slopeType String

The slope type

Possible Values:"degree"|"percent-rise"|"adjusted"

zFactor Number

A ratio of z unit / xy unit, with optional exaggeration factored in.

pixelSizePower Number
optional

Pixel size factor accounts for changes in scale as the viewer zooms in and out on the map display. It controls the rate at which the Z Factor changes. This parameter is only valid when the scalingType is adjusted.

pixelSizeZFactor Number
optional

Pixel Size Power accounts for the altitude changes (or scale) as the viewer zooms in and out on the map display. It is the exponent applied to the pixel size term in the equation that controls the rate at which the Z Factor changes to avoid significant loss of relief. This parameter is only valid when the scalingType is adjusted.

removeEdgeEffect Boolean
optional

Remove edge effect when true

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Create a slope from elevation data.
const slope = rasterFunctionUtils.slope({
  slopeType: "degree",
  zFactor: 1
});

sqrt

Method
sqrt(parameters){RasterFunction}

Creates a raster function that calculates the square root of the pixel values in a raster. See Suqare Root function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.sqrt({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

square

Method
square(parameters){RasterFunction}

Creates a raster function that calculates the square of the pixel values in a raster. See Square function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.square({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

statistics

Method
statistics(parameters){RasterFunction}

Creates a Statistics function that calculates focal statistics for each pixel of an image based on a defined focal neighborhood. See Statistics function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
statisticsType String

The statistics type

Possible Values:"min"|"max"|"majority"|"mean"|"minority"|"stddev"|"median"

rows Number

Number of rows.

cols Number

Number of columns.

fillNoDataOnly Boolean
optional

When true only fills noData pixels

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Create majority statistics function to get rid of noises in the image.
const slope = rasterFunctionUtils.statistics({
  statisticsType: "majority",
  rows: 3,
  cols: 3
});

statisticsHistogram

Method
statisticsHistogram(parameters){RasterFunction}

Creates a Statistics And Histogram function to define the statistics and histogram of a raster. See Statistics And Histogram function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
optional

The statistics parameter.

histograms RasterHistogram[]
optional

The histogram parameter.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// attach statistics and histograms to the input imagery.
const statsHistFunction = rasterFunctionUtils.statisticsHistogram({
  statistics: [{ min: 1, max: 5, mean: 3, standardDeviation: 1 }],
  histograms: [{ min: 1, max: 5, counts: [100, 200, 100, 200, 100] }]
});

stretchMinMax

Method
stretchMinMax(parameters){RasterFunction}

Creates a Stretch function using min-max stretch type. Pixel values inside [min, max] defined in the band's statistics are stretched to [outputMin, outputMax], those fall outside are clamped to [outputMin, outputMax]. See Stretch function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
optional

Default is the input data source's statistics.

outputMin Number
optional

The minimum output value. Default is 0.

outputMax Number
optional

The maximum output value. Default is 255.

useGamma Boolean
optional

When true, gamma stretch is applied.

gamma Number[]
optional

The gamma values used for each band, needed when useGamma is true.

dynamicRangeAdjustment Boolean
optional

When true, perform dynamic range adjustment (not supported on client side).

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// stretch NDVI values from -1 to 1 to 0 to 255.
layer.rasterFunction = rasterFunctionUtils.stretchMinMax({
  statistics: [{min: -1, max: 1, avg: 0, stddev: 0.1}],
  outputPixelType: "u8"
});

stretchPercentClip

Method
stretchPercentClip(parameters){RasterFunction}

Creates a Stretch function using percent-clip stretch type. The input data must have histograms for it to work properly. See Stretch function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
minPercent Number

Percentage of the lowest pixel values to be excluded.

maxPercent Number

Percentage of the highest pixel values to be excluded.

outputMin Number
optional

The minimum output value. Default is 0.

outputMax Number
optional

The maximum output value. Default is 255.

useGamma Boolean
optional

When true, gamma stretch is applied.

gamma Number[]
optional

The gamma values used for each band, needed when useGamma is true.

dynamicRangeAdjustment Boolean
optional

When true, perform dynamic range adjustment (not supported on client side)

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Stretch Landsat imagery using percent clip, pixels values within both lower 2% and
// upper 2% are clamped to output min (0) and output max (255).
layer.rasterFunction = rasterFunctionUtils.stretchPercentClip({
  minPercent: 2,
  maxPercent: 2,
  outputPixelType: "u8"
});

stretchStandardDeviation

Method
stretchStandardDeviation(parameters){RasterFunction}

Creates a Stretch function using standard-deviation stretch type. Pixel values inside the defined number of standard deviations are stretched to [outputMin, outputMax], those fall outside are clamped to [outputMin, outputMax]. See Stretch function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
numberOfStandardDeviations Number

Values with in the given number of standard deviations are stretched to [outputMin, outputMax], those fall outside are clamped.

outputMin Number
optional

The minimum output value. Default is 0.

outputMax Number
optional

The maximum output value. Default is 255.

useGamma Boolean
optional

When true, gamma stretch is applied.

gamma Number[]
optional

The gamma values used for each band, needed when useGamma is true.

optional

The avg and stddev in each band's statistics is used along with numberOfStandardDeviations to calculate the cut off pixels values beling stretched. Default is the input data source's statistics.

dynamicRangeAdjustment Boolean
optional

When true, perform dynamic range adjustment (not supported on client side).

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Stretch elevation values with in 2 standard deviations to 0 to 255.
layer.rasterFunction = rasterFunctionUtils.stretchStandardDeviation({
  numberOfStandardDeviations: 2,
  statistics: [{min: 20, max: 1200, avg: 600, stddev: 100}],
  outputPixelType: "u8"
});

stretchStandardDeviation

Method
stretchStandardDeviation(parameters){RasterFunction}

Creates a Stretch function without a specific stretch method. Since output range can differ from pixel type's range, pixel values are projected to the output range linearly based on pixel type. For aerial or satellite imagery, it simply adjusts radiometric resolution and preserves DN values relatively. This is a no-op for all unsigned 8 bit images. See Stretch function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
outputMin Number
optional

The minimum output value. Default is 0.

outputMax Number
optional

The maximum output value. Default is 255.

useGamma Boolean
optional

When true, gamma stretch is applied.

gamma Number[]
optional

The gamma values used for each band, needed when useGamma is true.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Apply no additional stretch, pixel values are simply fitted into 0 to 255 range.
layer.rasterFunction = rasterFunctionUtils.stretchNone({
  outputPixelType: "u8"
});

table

Method
table(parameters){RasterFunction}

Creates an Attribute Table function to specify an attribute table for the input categorical raster. See Attribute Table function.

Parameters
Specification
parameters Object

The parameters object has the following properties.

Specification
attributeTable FeatureSet

The attribute table represented using a feature set.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
// Attach a classification table to the categorical imagery data.

const attributeTable = FeatureSet.fromJSON({
 displayFieldName: "",
 fields: [
   {
     name: "ObjectID",
     type: "esriFieldTypeOID",
     alias: "OID"
   },
   {
     name: "Value",
     type: "esriFieldTypeInteger",
     alias: "Value"
   },
   {
     name: "ClassName",
     type: "esriFieldTypeString",
     alias: "ClassName",
     length: 256
   },
   {
     name: "Red",
     type: "esriFieldTypeInteger",
     alias: "Red"
   },
   {
     name: "Green",
     type: "esriFieldTypeInteger",
     alias: "Green"
   },
   {
     name: "Blue",
     type: "esriFieldTypeInteger",
     alias: "Blue"
   },
   {
     name: "Alpha",
     type: "esriFieldTypeInteger",
     alias: "Alpha"
    }
  ],
  features: [
    {
      attributes: {
        ObjectID: 1,
        Value: 10,
        ClassName: "c0",
        Red: 255,
        Green: 190,
        Blue: 190,
        Alpha: 255
      }
    },
    {
      attributes: {
        ObjectID: 2,
        Value: 11,
        ClassName: "c1",
        Red: 255,
        Green: 127,
        Blue: 127,
        Alpha: 255
      }
    }
  ]
});
const tableFunction = rasterFunctionUtils.table({ attributeTable });

tan

Method
tan(parameters){RasterFunction}

Creates a raster function that calculates the tangent of the pixels in a raster. See Tan function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.tan({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

tanh

Method
tanh(parameters){RasterFunction}

Creates a raster function that calculates the hyperbolic tangent of the pixels in a raster. See Tanh function.

Parameter

Input parameters for performing math operations on an input raster.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.tanh({
  raster: rasterFunctionUtils.defaultRaster,
  outputPixelType: "f32"
});

times

Method
times(parameters){RasterFunction}

Creates a raster function that multiplies the values of two rasters on a pixel-by-pixel basis. See Times function.

Parameter

Input parameters for performing math operations on two input rasters.

Returns
Type Description
RasterFunction Returns a RasterFunction.
Example
layer.rasterFunction = rasterFunctionUtils.times({
  raster: rasterFunctionUtils.defaultRaster,
  raster2: 1
});

Type Definitions

ConditionalParameters

Type Definition
ConditionalParameters Object

Conditional parameters

Properties

The input raster.

trueRaster RasterArgument

The true raster.

falseRaster RasterArgument

The false raster.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

ExtractBandByIdParameters

Type Definition
ExtractBandByIdParameters Object

Extract bands parameters specified using band ids.

Properties
bandIds Number[]

The 0-based band ids.

missingBandAction String
optional

Indicate whether to use best possible matching band when the requested band is missing.

Possible Values:"fail"|"best-match"

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

ExtractBandByNameParameters

Type Definition
ExtractBandByNameParameters Object

Extract bands parameters specified using band wavelengths.

Properties
bandWavelengths Number[]

The band wavelengths.

missingBandAction String
optional

Indicate whether to use best possible matching band when the requested band is missing.

Possible Values:"fail"|"best-match"

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

ExtractBandByWavelengthParameters

Type Definition
ExtractBandByWavelengthParameters Object

Extract bands parameters specified using band names.

Properties
bandNames String[]

The band names.

missingBandAction String
optional

Indicate whether to use best possible matching band when the requested band is missing.

Possible Values:"fail"|"best-match"

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Math1RasterParameters

Type Definition
Math1RasterParameters Object

Input parameters for performing math operations on one input raster.

Properties

The first raster.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

Math2RastersParameters

Type Definition
Math2RastersParameters Object

Input parameters for perform math operations between two rasters.

Properties

The first raster input.

raster2 RasterArgument

The second raster input.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

PixelValueRangeMap

Type Definition
PixelValueRangeMap Object

Range map pixel values.

Properties
range Number[]

The pixel value range.

output Number

The mapped pixel value. Null or undefined will produce NoData as the output.

RasterArgument

Type Definition
RasterArgument RasterFunction|String|Number

Raster argument used to specify raster(s) used in raster processing. When the input raster is the image service itself and if the raster function takes:

  • A single input raster: the raster parameter can be omitted.
  • Multiple input rasters: the image service raster needs to be represented using defaultRaster as ("$$").

When the input raster is the result of a another raster function processing:

  • Set the raster parameter to a result of a raster function.

When the raster function takes more than one input rasters:

  • One of the input (usually the first) must be either another raster function or an image service raster
  • Additional rasters can also be specified in the form of a scalar, e.g. 100. When the function is applied on a dynamic image service:
  • $RasterId (e.g. "$1") can be used to reference a raster by its objectId.

RasterColormapByMapParameters

Type Definition
RasterColormapByMapParameters Object

Raster colormap input parameters specified using a colormap.

Properties

The colormap.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

RasterColormapByNameParameters

Type Definition
RasterColormapByNameParameters Object

Raster colormap input parameters specified using colormap name.

Properties
colorRampName String

The name of a predefined colorramp or colormap.

Possible Values:"aspect"|"black-to-white"|"blue-bright"|"blue-light-to-dark"|"blue-green-bright"|"blue-green-light-to-dark"|"brown-light-to-dark"|"brown-to-blue-green-diverging-right"|"brown-to-blue-green-diverging-dark"|"coefficient-bias"|"cold-to-hot-diverging"|"condition-number"|"cyan-to-purple"|"cyan-light-to-blue-dark"|"distance"|"elevation1"|"elevation2"|"errors"|"gray-light-to-dark"|"green-bright"|"green-light-to-dark"|"green-to-blue"|"orange-bright"|"orange-light-to-dark"|"partial-spectrum"|"partial-spectrum-1-diverging"|"partial-spectrum-2-diverging"|"pink-to-yellow-green-diverging-bright"|"pink-to-yellow-green-diverging-dark"|"precipitation"|"prediction"|"purple-bright"|"purple-to-green-diverging-bright"|"purple-to-green-diverging-dark"|"purple-blue-bright"|"purple-blue-light-to-dark"|"purple-red-bright"|"purple-red-light-to-dark"|"red-bright"|"red-light-to-dark"|"red-to-blue-diverging-bright"|"red-to-blue-diverging-dark"|"red-to-green"|"red-to-green-diverging-bright"|"red-to-green-diverging-dark"|"slope"|"spectrum-full-bright"|"spectrum-full-dark"|"spectrum-full-light"|"surface"|"temperature"|"white-to-black"|"yellow-to-dark-red"|"yellow-to-green-to-dark-blue"|"yellow-to-red"|"yellow-green-bright"|"yellow-green-light-to-dark"|"random"|"elevation"|"gray"|"hillshade"|"ndvi"|"ndvi2"|"ndvi3"

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

RasterColormapByRampParameters

Type Definition
RasterColormapByRampParameters Object

Raster colormap input parameters specified using a colorramp.

Properties

A colorramp

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

RasterValueToColor

Type Definition
RasterValueToColor Object

A pixel value to color mapping.

Properties
value Number

Pixel value.

Color represented using [r,g,b] or [r,g,b,a], or the color's name or hex string.

optional

The input raster. Default is the image service.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

SetNullParameters

Type Definition
SetNullParameters Object

SetNull parameters

Properties

The input raster.

falseRaster RasterArgument

The false raster.

outputPixelType String
optional

The output pixel type, default is unknown.

Possible Values:"unknown"|"s8"|"s16"|"s32"|"u8"|"u16"|"u32"|"f32"|"f64"

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