hongfaqiu / TIFFImageryProvider

Load GeoTIFF/COG(Cloud optimized GeoTIFF) on Cesium
https://tiff-imagery-provider.opendde.com/?panel=layer
MIT License
62 stars 13 forks source link

您好,请问我的图例是 -60到 40直接改如何配渲染颜色啊,color 插值只允许0-1 之间 #21

Closed wenlan-coder closed 1 year ago

hongfaqiu commented 1 year ago

可以自行转换一下,-60对应0,40对应1,编写你的自定义色带colors domain参数默认为波段的[min, max],对应色带[0, 1]的值,也可进行自定义 displayRange参数表示会渲染的值范围,默认为波段的[min, max]

  /** custom interpolate colors, [stopValue(0 - 1), color] or [color], if the latter, means equal distribution 
   * @example
   * [[0, 'red'], [0.6, 'green'], [1, 'blue']]
  */
  colors?: [number, string][] | string[];
  /**
   * The value domain to scale the color.
   */
  domain?: [number, number];

  /**
   * Range of values that will be rendered, values outside of the range will be transparent.
   */
  displayRange?: [number, number];
wenlan-coder commented 1 year ago

太感谢您啦!!!

hongfaqiu commented 1 year ago

能帮到你我也很开心!