utils

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

This object contains utility methods for obtaining information about supported renderers of raster layers (i.e. ImageryLayer, ImageryTileLayer, or WCSLayer).

Method Overview

Name Return Type Summary Object
Promise<Number[]>

Returns default band ids used by a multispectral imagery layer when using a raster rgb or stretch renderer.

utils

Returns supported raster renderer information of an imagery layer.

utils

Method Details

getDefaultBandCombination

Method
getDefaultBandCombination(params){Promise<Number[]>}

Returns default band ids used by a multispectral imagery layer when using a raster rgb or stretch renderer.

Parameters
Specification
params Object

Input parameters for getting default band ids about a raster layer. See the table below for details of each parameter.

Specification

Layer for which the default band ids are returned.

renderingRule RasterFunction
optional

Deprecated since 4.27. Use rasterFunction instead.

rasterFunction RasterFunction
optional

Specifies the function for how the requested image should be processed. When rasterFunction is applied, the server returns updated service information that reflects custom processing as defined by the raster function. If not provided, the output renderer is created using the layer's rasterFunction.

signal AbortSignal
optional

Allows for cancelable requests. If canceled, the promise will be rejected with an error named AbortError. See also AbortController.

Returns
Type Description
Promise<Number[]> Resolves to an array containing a list of default band ids.

getSupportedRendererInfo

Method
getSupportedRendererInfo(params){Promise<SupportedRendererInfo>}

Returns supported raster renderer information of an imagery layer.

Parameters
Specification
params Object

Input parameters for getting supported renderer info about a raster layer. See the table below for details of each parameter.

Specification

The input layer for which the renderer info is returned.

renderingRule RasterFunction
optional

Deprecated since 4.27. Use rasterFunction instead.

rasterFunction RasterFunction
optional

Specifies the function for how the requested image should be processed. When rasterFunction is applied, the server returns updated service information that reflects custom processing as defined by the raster function. If not provided, the output renderer is created using the layer's rasterFunction.

signal AbortSignal
optional

Allows for cancelable requests. If canceled, the promise will be rejected with an error named AbortError. See also AbortController.

Returns
Type Description
Promise<SupportedRendererInfo> Resolves to an object containing information about the default renderer and other supported renderer types.

Type Definitions

SupportedRendererInfo

Type Definition
SupportedRendererInfo

The result object of the getSupportedRendererInfo() method. See the table below for details of each property.

Properties

The default renderer of the input layer.

supportedTypes SupportedRendererType[]

A list of supported renderer types that may be applied to the input layer.

SupportedRendererType

Type Definition
SupportedRendererType String

Supported renderer types for imagery layers.

Possible Values:"raster-stretch" |"raster-unique-value" |"raster-rgb" |"raster-class-breaks" |"raster-colormap" |"raster-shaded-relief" |"raster-vector-field" |"raster-flow"

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