ST_Value
更新时间:
复制 MD 格式
Returns the value of a cell at the specified band, column, and row in a raster object.
Syntax
float8 ST_Value(raster rast, integer band, integer colsn, integer rowsn, boolean exclude_nodata_value);Parameters
| Parameter | Description |
|---|---|
rast | The raster object. |
band | The band number. Band numbers start at 0. Default: 0. |
colsn | The column number of the cell. Default: 0. |
rowsn | The row number of the cell. Default: 0. |
exclude_nodata_value | Specifies whether to exclude NoData values. Default: true. |
Usage notes
Band numbers start at 0. The default band number, column number, and row number are all 0.
Examples
Retrieve the value of the cell at column 3, row 4 in band 1 of the raster object stored in the t_pixel table:
SELECT ST_Value(rast, 1, 3, 4) FROM t_pixel WHERE id = 2;
st_value
----------
88
(1 row)该文章对您有帮助吗?