獲得所有波段的像素值。

語法

setof record ST_PointValues(raster raster_obj,
        integer column_sn,
        integer row_sn,
        boolean exclude_nodata default true,
        out integer band,
        out float8 value);
setof record ST_PointValues(raster raster_obj,
        float8  x,
        float8  y,
        boolean exclude_nodata default true,
        out integer band,
        out float8 value);

參數(shù)

參數(shù)名稱 描述
raster_obj 需要裁剪的raster對象。
column_sn 像素所在列號,從左上角點起計算。
row_sn 像素所在行號,從左上角點起計算。
x 像素的經(jīng)度坐標(biāo)。
y 像素的緯度坐標(biāo)。
exclude_nodata 是否返回Nodata值。

如果為true,且像素值為Nodata,則不返回。

band 像素值所在波段號。
value 像素值。

描述

根據(jù)行號或列號以及經(jīng)緯坐標(biāo)獲得所有波段的像素值。

示例

select * from
    ( select (st_pointValues(rast, 125.84382034243441 , 47.67709555783107, false)).*
      from t_pixel where id = 3) a
ORDER by band;

 band | value
------+-------
    0 |    66
    1 |    87
    2 |    28

select * from
    ( select (st_pointValues(rast, 125 , 47)).*
      from t_pixel where id = 3) a
ORDER by band;
 band | value
------+-------
    0 |    39
    1 |    66
    2 |    11