Appearance
Type alias: TIFFImageryProviderRenderOptions
Ƭ TIFFImageryProviderRenderOptions: Object
波段计算
- 比如 NDVI 计算
Example
js
TIFFImageryProvider.fromUrl(YOUR_TIFF_URL, {
renderOptions: {
single: {
colorScale: "rainbow",
domain: [-1, 1],
expression: "(b1 - b2) / (b1 + b2)"
}
}
});- 自定义色带
Example
js
TIFFImageryProvider.fromUrl(YOUR_TIFF_URL, {
renderOptions: {
single: {
colors: [
[1, "rgb(154, 206, 127)"],
[2, "rgb(163, 214, 245)"],
[3, "rgb(255, 251, 177)"],
[4, "rgb(193, 114, 97)"],
[5, "rgb(220, 100, 120)"],
[6, "rgb(49, 173, 105)"]
],
type: "discrete",
useRealValue: true // 使用tiff真实值作为色带的控制点
}
}
});Type declaration
| Name | Type | Description |
|---|---|---|
nodata? | number | 无效值,默认从 tiff meta 读取 |
convertToRGB? | boolean | 尝试将多波段cog渲染为rgb,优先级 1 |
multi? | MultiBandRenderOptions | 优先级 2 |
single? | SingleBandRenderOptions | 优先级 3 |
Defined in
src/layers/TIFFImageryProvider/index.ts:157

