7.144 SDO_GEOR.setScaling

Format

SDO_GEOR.setScaling(
     georaster    IN OUT SDO_GEORASTER, 
     layerNumber  IN NUMBER, 
     scalingFunc  IN SDO_NUMBER_ARRAY);

Description

Sets the scaling function associated with a layer, or deletes the existing value if you specify a null scalingFunc parameter.

Note:

GeoRaster does not perform operations using the scaling function in the current release.

Parameters

georaster

GeoRaster object.

layerNumber

Number of the layer for which to perform the operation.

scalingFunc

An array of numeric values, with one value for each coefficient in the scaling function. The scaling function is as follows:

value = (a0 + a1 * cellvalue) / (b0 + b1 * cellvalue)

The order of the coefficients is: a0, a1, b0, b1.

Usage Notes

The GeoRaster object is automatically validated after the operation completes.

An exception is raised if layerNumber is null or invalid for the GeoRaster object; if scalingFunc is of the wrong array size; if one of a0, a1, b0, and b1 is null; or if both b0 and b1 are 0 (zero).

Examples

The following example sets the coefficients of the scaling function for layer 2 of a GeoRaster object. (It refers to a table named GEORASTER_TABLE, whose definition is presented after Example 1-1 in Storage Parameters.)

DECLARE
  grobj sdo_georaster;
BEGIN
  SELECT georaster INTO grobj FROM georaster_table WHERE georid=4 FOR UPDATE;
  sdo_geor.setScaling(grobj, 2, sdo_number_array(1, 0.5, 1, 0));
  UPDATE georaster_table SET georaster = grobj WHERE georid=4;
  COMMIT;
END;
/