SDO_GEOR.getRasterBlockLocator
Format
SDO_GEOR.getRasterBlockLocator(
georaster IN SDO_GEORASTER,
pyramidLevel IN NUMBER,
bandBlockNumber IN NUMBER,
rowBlockNumber IN NUMBER,
columnBlockNumber IN NUMBER,
loc IN OUT NOCOPY BLOB,
isBitmapMask IN VARCHAR2 DEFAULT NULL,
lock_for_write IN VARCHAR2 DEFAULT NULL);
or
SDO_GEOR.getRasterBlockLocator(
georaster IN SDO_GEORASTER,
pyramidLevel IN NUMBER,
rowNumber IN NUMBER,
colNumber IN NUMBER,
bandNumber IN NUMBER,
offset OUT NUMBER,
loc IN OUT NOCOPY BLOB,
isBitmapMask IN VARCHAR2 DEFAULT NULL,
lock_for_write IN VARCHAR2 DEFAULT NULL);
or
SDO_GEOR.getRasterBlockLocator(
georaster IN SDO_GEORASTER,
pyramidLevel IN NUMBER,
ptGeom IN SDO_GEOMETRY,
layerNumber IN NUMBER,
offset OUT NUMBER,
loc IN OUT NOCOPY BLOB,
isBitmapMask IN VARCHAR2 DEFAULT NULL,
lock_for_write IN VARCHAR2 DEFAULT NULL);
Description
This procedure has three formats:
-
The first listed format returns the LOB locator of a raster block by specifying the
pyramidLevel,bandBlockNumber,rowBlockNumber, andcolumnBlockNumberparameters. -
The second and third listed formats return the LOB locator of a raster block that contains a specific single cell and the offset of the cell within the raster block. The specific single cell is identified by the
pyramidLevel,rowNumber,columnNumber, andbandNumberparameters or by a point geometry parameter (ptGeom) in either the cell coordinate space or the model coordinate space.
Parameters
georaster
GeoRaster object.
pyramidLevel
Pyramid level of the block.
bandBlockNumber
Band number of the block.
bandNumber
Band number of the cell.
rowBlockNumber
Row number of the block.
rowNumber
Row number of the cell.
columnBlockNumber
Column number of the block.
columnNumber
Column number of the cell.
ptGeom
Point geometry that locates the cell.
layerNumber
Number of the logical layer that contains the cell whose value is to be returned. (As mentioned in Bands_ Layers_ and Metadata, the logical layer number is the physical band ordinate number plus 1.
offset
Output parameter to contain the offset (in bytes) of the cell inside the raster block that is located. If the raster block is compressed, it always refers to the offset of the cell in the decompressed version of the block.
loc
LOB locator.
isBitmapMask
The string TRUE specifies that a bitmap mask block will be accessed; the string FALSE specifies that a regular raster block will be accessed. If you do not specify this parameter, a regular raster block will be accessed. For an explanation of bitmap masks, see Bitmap Masks.
lockForWrite
The string TRUE locks the row in the raster data table so that other users cannot lock or update that row until the current transaction ends; the string FALSE does not lock the row in the raster data table. If you do not specify this parameter, the row is not locked.
Usage Notes
This procedure gets the raster block locator (and for some formats, the offset) using the specified parameters. The LOB locator is not opened, and no data is read or processed. You should use standard LOB operations to open and close the LOB locator and to read data from and write data to the LOB locator.
To ensure that data is read or written correctly, you must understand the physical storage of the raster data (described in GeoRaster Physical Storage), and you must compress and decompress the raster data as needed.
For information about LOB locators, see Oracle AI Database SecureFiles and Large Objects Developer’s Guide.
Examples
The following example gets the LOB locators of two raster blocks, the first a regular raster block and the second a bitmap mask block. Both calls to the SDO_GEOR.getRasterBlockLocator procedure lock the row in the raster data table.
DECLARE
gr sdo_georaster;
lb blob;
offset number;
BEGIN
select georaster into gr from georaster_table where georid=1;
sdo_geor.getRasterBlockLocator(gr, 0, 0, 0, 0, offset,lb, null, 'TRUE');
sdo_geor.getRasterBlockLocator(gr, 0, 0, 0, 0, offset,lb, 'TRUE', 'TRUE');
END;
/