7.116 SDO_GEOR.setBinFunction
Format
SDO_GEOR.setBinFunction( georaster IN SDO_GEORASTER, layerNumber IN NUMBER binFunction IN SDO_NUMBER_ARRAY);
Description
Sets the bin function associated with a layer.
Parameters
- georaster
-
GeoRaster object.
- layerNumber
-
Number of the layer for which to return the bin type. A value of 0 (zero) indicates the object layer.
- binFunction
-
Bin function as an array whose elements specify the bin type, total number of bins, first bin number, minimum cell value, and maximum cell value. The SDO_NUMBER_ARRAY type is defined as
VARRAY(1048576) OF NUMBER
. See the Usage Notes for more information and an example.
Usage Notes
A bin function maps values or value ranges of the GeoRaster cells to specific bin numbers, which are all integers. If a bin function of type LINEAR
is defined, it is used by the SDO_GEOR.generateStatistics function for calculating statistics on cell values. GeoRaster does not provide interfaces to manipulate and process bin functions.
The binFunction
parameter specifies an array of five numbers, which have the following meaning:
-
The first number identifies the bin type, and must be 0 (
LINEAR
) or 1 (LOGARIGHM
). -
The second number identifies the total number of bins.
-
The third number identifies the number of the first bin.
-
The fourth number is the minimum cell value in the range.
-
The fifth number is the maximum cell value in the range.
For example, if binFunction
is SDO_NUMBER_ARRAY(0,10,1,0,511)
, the bin type is LINEAR
, there are 10 bins numbered 1 through 10 (that is, starting at 1), and cell values from 0 through 511 are uniformly distributed to bins 1 through 10.
An exception is raised if layerNumber
is null, negative, or greater than the maximum layer number.
Examples
The following example sets the bin function for layer 3 of a specified GeoRaster object, using the binFunction
parameter value explained in the Usage Notes.
DECLARE gr sdo_georaster; BEGIN SELECT georaster INTO gr FROM georaster_table WHERE georid=4 FOR UPDATE; sdo_geor.setBinFunction(gr, 3, sdo_number_array(0,10,1,0,511)); UPDATE georaster_table SET georaster=gr WHERE georid=4; END; /
Parent topic: SDO_GEOR Package Reference