ST_Raster.getPixelData

Definition

The ST_Raster.getPixelData function writes the pixel data of an ST_Raster or a subset of an ST_Raster to a defined ST_PixelData object.

Syntax

Oracle

getPixelData () RETURN ST_PIXELDATA
getPixelData (parameter_list IN VARCHAR2) RETURN ST_PIXELDATA

PostgreSQL

getPixelData (raster IN ST_RASTER) RETURN ST_PIXELDATA
getPixelData (raster IN ST_RASTER, parameter_list IN TEXT) RETURN ST_PIXELDATA

SQL Server

getPixelData (parameter_list IN NVARCHAR) RETURN ST_PIXELDATA

Returns

ST_PixelData

Parameters

Parameter

Description

raster

The ST_Raster value

parameter_list

A comma-delimited list of parameters enclosed in single quotes that may include the following parameters:

  • band <1st band number>[,<2nd band number>],…,[nth band number]>—A comma-delimited list of band sequence numbers of the bands to be exported

    The pixel data is written to the ST_PixelData object in the order of the band sequence numbers. If the parameter is not specified, all the bands are written in regular band sequential order.

  • level <pyramid level>—The pyramid level of the ST_Raster object that is written to the ST_PixelData object; the default is the base level (0).
  • window (minx,miny,maxx,maxy)—The extent of the ST_Raster object to be written to an ST_PixelData object specified in pixel coordinates
  • extent (minx,miny,maxx,maxy)—The extent of the ST_Raster object to be written to an ST_PixelData object specified in geographic coordinates

Examples

The following example selects the level 1 pyramid data and inserts the result into another table.

Oracle

CREATE TABLE pixeldata of sde.ST_PixelData;

INSERT INTO PIXELDATA
SELECT t.image.getPixelData('level=1')
FROM LAND t
WHERE t.image.raster_id = 1;

CREATE TABLE pixeldata2 (data ST_PixelData);

INSERT INTO PIXELDATA2
SELECT t.image.getPixelData('level=1')
FROM LAND t
WHERE t.image.raster_id = 1;

PostgreSQL

CREATE TABLE pixeldata (data ST_PixeData);

INSERT INTO pixeldata
SELECT getPixelData(image,'level=1')
FROM land
WHERE getRasterID(image) = 1;

SQL Server

CREATE TABLE pixeldata (data ST_PixelData);

INSERT INTO pixel.data
SELECT image.getPixelData('level=1')
FROM land
WHERE image.raster_id = 1;

2/5/2013