ST_Raster
Definition
ST_Raster creates an ST_Raster type object.
Syntax
Oracle
sde.st_raster (filename IN VARCHAR2) sde.st_raster (filename IN VARCHAR2, options IN VARCHAR2) sde.st_raster (data IN ST_PIXELDATA) sde.st_raster (data IN ST_PIXELDATA, options IN VARCHAR2)
PostgreSQL
st_raster (filename IN TEXT) st_raster (filename IN TEXT, options IN TEXT) st_raster (data IN ST_PIXELDATA) st_raster (data IN ST_PIXELDATA, options IN TEXT)
SQL Server
st_raster (filename IN NVARCHAR, data IN ST_PIXELDATA, options IN NVARCHAR)
Parameters
Parameter | Description |
---|---|
filename | The name of the source raster data |
data | A predefined ST_PixelData object |
options | A comma-delimited list enclosed in single quotes that may include the following:
|
Examples
Oracle
This example inserts a GeoTIFF image file into an ST_Raster object by explicitly calling the ST_Raster constructor.
INSERT INTO NOVA (image) VALUES (sde.st_raster('nova.tif','compression=lz77'));
This example copies ST_Raster object values from the source table called world into a target table called nova. In this case, the ST_Raster constructor is implicitly called by the INSERT statement to create the ST_Raster objects in the target table.
INSERT INTO NOVA (image) SELECT image FROM WORLD;
In this example, an ST_PixelData object is populated with the pixels of an ST_Raster object and inserted into another ST_Raster object.
DECLARE data sde.ST_PixelData; BEGIN SELECT t.image.getPixelData('level=1') INTO DATA FROM NOVA t; INSERT INTO NOVA VALUES (sde.st_raster(data, 'compression=lz77')); END; /
PostgreSQL
This example inserts a GeoTIFF image file into an ST_Raster object by explicitly calling the ST_Raster constructor.
INSERT INTO nova (image) VALUES (sde.st_raster('nova.tif','compression=lz77'));
This example copies ST_Raster object values from the source table called world into a target table called nova. In this case, the ST_Raster constructor is implicitly called by the INSERT statement to create the ST_Raster objects in the target table.
INSERT INTO nova (image) SELECT image FROM world;
In this example, an ST_PixelData object is populated with the pixels of an ST_Raster object and inserted into another ST_Raster object.
DECLARE data st_pixeldata; BEGIN SELECT getPixelData(image, 'level=1') INTO data FROM nova; INSERT into nova VALUES (sde.st_raster(data,''compression=lz77'')); END;
SQL Server
This example inserts a GeoTIFF image file into an ST_Raster object by explicitly calling the ST_Raster constructor.
INSERT INTO nova (image) VALUES (ST_Raster::construct('nova.tif',NULL,'compression=lz77'));
This example copies ST_Raster object values from the source table called world into a target table called nova. In this case, the ST_Raster constructor is implicitly called by the INSERT statement to create the ST_Raster objects in the target table.
INSERT INTO nova (image) SELECT image FROM world;
In this example, an ST_PixelData object is populated with the pixels of an ST_Raster object and inserted into another ST_Raster object.
DECLARE @data ST_Pixeldata; SET @data = (SELECT image.getPixelData('level=1') FROM nova); INSERT INTO nova VALUES (ST_Raster::construct(NULL, @data, 'compression=lz77')) ;