SDO_GEOR.setDefaultRed
Format
SDO_GEOR.setDefaultRed(
georaster IN OUT SDO_GEORASTER,
defaultRed IN NUMBER);
Description
Sets the number of the layer to be used for the red color component (in the RGB color space) for displaying a GeoRaster object, or deletes the existing value if you specify a null defaultRed parameter.
Parameters
georaster
GeoRaster object.
defaultRed
Number of the layer to be used for the red color component (in the RGB color space) for displaying the specified GeoRaster object. Must be greater than 0 (zero) and less than or equal to the highest layer number in the GeoRaster object.
Usage Notes
The default red, green, and blue values are used for true-color displays, not for pseudocolor or grayscale displays. These values are optional, and they are intended for use only when visualizing multilayer or hyperspectral GeoRaster objects.
The GeoRaster object is automatically validated after the operation completes.
An exception is raised if you are trying to set or remove the number of the layer to be used for the red color component only, or if defaultRed is not a valid layer number for the GeoRaster object.
Examples
The following example sets the default red, green, and blue color layers for the GeoRaster objects (GEORASTER column) in the GEORASTER_TABLE table, and it returns an array with the layer numbers for the red, green, and blue color components for displaying these GeoRaster objects. (The GEORASTER_TABLE table definition is presented after Example: Using storageParam Keywords in Storage Parameters.)
DECLARE
grobj sdo_georaster;
BEGIN
SELECT georaster INTO grobj FROM georaster_table WHERE georid=4 FOR UPDATE;
sdo_geor.setDefaultRed(grobj, 5);
sdo_geor.setDefaultGreen(grobj, 4);
sdo_geor.setDefaultBlue(grobj, 3);
UPDATE georaster_table SET georaster = grobj WHERE georid=4;
COMMIT;
END;
/
SELECT sdo_geor.getDefaultColorLayer(georaster) FROM georaster_table
WHERE georid=4;
SDO_GEOR.GETDEFAULTCOLORLAYER(GEORASTER)
--------------------------------------------------------------------------------
SDO_NUMBER_ARRAY(5, 4, 3)
1 row selected.