全部產品
Search
文件中心

AnalyticDB:ST_SetColorTable

更新時間:Feb 05, 2024

設定raster對象的指定波段的顏色表資訊,採用顏色表的JSON格式。

文法

raster ST_SetColorTable(raster rast, integer band_sn, cstring clb);

參數

參數名稱描述
rastraster對象。
band_sn指定的波段序號,從0開始。
clb顏色表的JSON格式,參見ST_ColorTable

樣本

update rast set rast=ST_SetColorTable(rast,0, 
'{"compsCount":4,
  "entries":[
    {"value":0,"c1":0,"c2":0,"c3":0,"c4":255},
    {"value":1,"c1":0,"c2":0,"c3":85,"c4":255},
    {"value":2,"c1":0,"c2":0,"c3":170,"c4":255}
  ]
}');

__________________________________
(1 row)