ST_Raster.getPixelType

Definition

The ST_Raster.getPixelType function returns the pixel type property of the ST_Raster. The following table lists valid pixel type values:

Value

Description

1bit

1-bit data

4bit

4-bit data

uint8

unsigned 8-bit integer

int8

signed 8-bit integer

uint16

unsigned 16-bit integer

int16

signed 16-bit integer

uint32

unsigned 32-bit integer

int32

signed 32-bit integer

float

single-precision floating-point number

double

double-precision floating-point number

getPixelType values

Syntax

Oracle

getPixelType()

PostgreSQL

getPixelType(raster IN ST_RASTER)

SQL Server

getPixelType()

Returns

Oracle

VARCHAR2

PostgreSQL

Text

SQL Server

NVARCHAR

Parameters

None

Examples

The following queries return the pixel type for each raster in the table:

Oracle

SELECT image.raster_id, image.getPixelType()
FROM FOO t;

T.IMAGE.RASTER_ID T.IMAGE.GETPIXELTYPE()
--------------- --------------------
              2 UINT8
              3 UINT8
             23 UINT8
             24 UINT8 
             42 UINT8
             43 UINT8

PostgreSQL

SELECT raster_id(image), getPixelType(image)
FROM foo;


RASTER_ID(IMAGE) GETPIXELTYPE(IMAGE)
---------------- --------------------
               2 UINT8
               3 UINT8
              23 UINT8
              24 UINT8 
              42 UINT8
              43 UINT8

SQL Server

SELECT image.raster_id, image.getPixelType()
FROM foo;

     RASTER_ID  GETPIXELTYPE()
--------------- --------------------
              2 UINT8
              3 UINT8
             23 UINT8
             24 UINT8 
             42 UINT8
             43 UINT8

11/18/2013