7.125 SDO_GEOR.setDefaultColorLayer
Format
SDO_GEOR.setDefaultColorLayer( georaster IN OUT SDO_GEORASTER, defaultRGB IN SDO_NUMBER_ARRAY);
Description
Sets the default numbers of the layers to be used for the red, green, blue, and alpha color components, respectively, for displaying a GeoRaster object, or deletes the existing values if you specify a null defaultRGB
parameter.
Parameters
- georaster
-
GeoRaster object.
- defaultRGB
-
Array of three or four numbers identifying the red, green, blue, and alpha color components, respectively, for displaying the specified GeoRaster object. Each number must be greater than 0 (zero) and less than or equal to the highest layer number in the GeoRaster object.
Usage Notes
The RGBA layer numbers specified are used for true-color displays, not for pseudocolor or grayscale displays.
The GeoRaster object is automatically validated after the operation completes.
You can set the layer number for each color component (RGB) by using the SDO_GEOR.setDefaultRed, SDO_GEOR.setDefaultGreen, SDO_GEOR.setDefaultBlue, and SDO_GEOR.setDefaultAlpha procedures.
The default RGBA layer numbers must be set or removed at the same time. The default alpha layer number is optional. If the default red, green, and blue layer numbers are set, the default alpha layer number can be set. If the default red, green, and blue layer numbers are removed, the default alpha layer number must also be removed.
Because the default alpha layer is optional, you can either (A) set the default red, green, and blue color components only by providing three numbers to this procedure or (B) set the default red, green, blue, and alpha color components by providing four numbers to this procedure. If defaultRGB
is an array of three numbers, it identifies the red, green and blue color components only. If defaultRGB
is an array of four numbers, it identifies the red, green, blue, and alpha components.
An exception is raised if defaultRGB
is of the wrong size or if any elements in it are null or are invalid layer numbers for the GeoRaster object.
Examples
The following example specifies that layer number 1 is to be used for the red, green, blue. and alpha color components for displaying the GeoRaster object (GEORASTER column) in the row with an GEORID column value of 2 in the GEORASTER_TABLE table. (The GEORASTER_TABLE table definition is presented after Example 1-1 in Storage Parameters.)
DECLARE grobj sdo_georaster; BEGIN SELECT georaster INTO grobj FROM georaster_table WHERE georid=2 FOR UPDATE; sdo_geor.setDefaultColorLayer(grobj, sdo_number_array(1,1,1,1)); UPDATE georaster_table SET georaster = grobj WHERE georid=2; COMMIT; END; /
Parent topic: SDO_GEOR Package Reference