ST_CellDepth

更新时间:
复制 MD 格式

Returns the pixel depth of a raster object as an integer. Pixel depth defines how many bits are used to store each cell value, which determines the range of values the raster can represent.

Syntax

integer ST_CellDepth(raster raster_obj);

Parameters

ParameterDescription
raster_objThe raster object.

Return values

Returns an integer representing the pixel depth. Valid values:

Return valueBits per cellTypical use
0UnknownPixel depth could not be determined
11-bitBinary masks
22-bitClassification with up to 4 categories
44-bitClassification with up to 16 categories
88-bitGrayscale imagery, optical band data
1616-bitDigital elevation models (DEM), high-precision imagery
3232-bitFloating-point meteorological or scientific data
6464-bitDouble-precision scientific raster data

Examples

Query the pixel depth of each raster object in raster_table:

SELECT ST_CellDepth(raster_obj) FROM raster_table;

Output:

8