ST_CellDepth

Updated at:
Copy as MD

Returns the pixel depth of a raster object. The pixel depth, also referred to as cell depth, is the number of bits used to represent each pixel. Valid values are 0, 1, 2, 4, 8, 16, 32, and 64. A value of 0 indicates that the pixel depth is unknown.

Syntax

integer ST_CellDepth(raster raster_obj);

Parameters

ParameterDescription
raster_objThe raster object.

Examples

The following example queries the pixel depth of each raster object in raster_table.

SELECT ST_CellDepth(raster_obj) FROM raster_table;

Output:

8