import { createRenderer } from "@arcgis/core/smartMapping/raster/renderers/stretch.js";const { createRenderer } = await $arcgis.import("@arcgis/core/smartMapping/raster/renderers/stretch.js");- Since
- ArcGIS Maps SDK for JavaScript 4.20
This object contains helper methods for generating a single-band stretch visualization for raster layers (i.e. ImageryLayer, ImageryTileLayer, or WCSLayer).
The createRenderer() method in this module generates a renderer that may be applied directly to the input layer.
Type definitions
RasterStretchColorrampRendererParameters
- Supertypes
- RasterRendererParameters
stretchType
- Type
- RasterStretchType | undefined
A preferred stretch type can be provided. See RasterStretchRenderer.stretchType for more information.
gamma
The gamma values to be used if useGamma is true.
Gamma refers to the degree of contrast between the mid-level gray values of a raster dataset.
It does not affect the black or white values in a raster dataset, only the middle values.
By applying a gamma correction, you can control the overall brightness of an ImageryLayer.
Gamma stretching is only valid when stretchType is none, standard-deviation, or min-max. See RasterStretchRenderer.gamma for more information.
RasterStretchColorrampResult
The result object of the createRenderer() method. See the table below for details of each property.
Functions
createRenderer
Generates a RasterStretchRenderer to render data from a single raster band.
- Signature
-
createRenderer (parameters: RasterStretchColorrampRendererParameters): Promise<RasterStretchColorrampResult>
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| parameters | Input parameters for generating a single-band stretch visualization. The | |
- Returns
- Promise<RasterStretchColorrampResult>
Resolves to an object containing a stretch renderer that can be set on the input renderer.