Returns the pixel depth of a raster object as an integer. Pixel depth is the number of bits used to store each pixel value. A return value of 0 indicates an unknown pixel depth.
Syntax
integer ST_CellDepth(raster raster_obj);Parameters
| Parameter | Description |
|---|---|
raster_obj | The raster object. |
Return value
An integer representing the pixel depth. Valid values: 0, 1, 2, 4, 8, 16, 32, 64.
| Value | Meaning |
|---|---|
0 | Unknown pixel depth |
1, 2, 4, 8, 16, 32, 64 | Valid pixel depth values |
Examples
Query the pixel depth of a raster object:
SELECT ST_CellDepth(raster_obj) AS pixel_depth FROM raster_table;Output:
pixel_depth
-------------
8该文章对您有帮助吗?