設置柵格對象或波段的元數據項。
語法
raster ST_SetMetaData(raster raster_obj,
text key,
text value);
raster ST_MetaData(raster raster_obj,
integer band,
text key,
text value);
參數
參數名稱 | 描述 |
---|---|
raster_obj | 需要計算的raster對象。 |
band | 波段序號,取值從0開始。 |
key | 需要設置的元數據項名稱。 |
value | 元數據值。 |
描述
如果傳入的元數據值為空值(''
),會刪除該元數據項。
示例
SELECT ST_MetaData(ST_SetMetaData(rast, 'NETCDF_DIM_time', '12345'), 'NETCDF_DIM_time')
FROM raster_table
st_metadata
------------
12345
SELECT ST_MetaData(ST_SetMetaData(rast, 0, 'NETCDF_DIM_time', '12345'), 0, 'NETCDF_DIM_time')
FROM raster_table
st_metadata
------------
12345