7.134 SDO_GEOR.setHistogramTable

Format

SDO_GEOR.setHistogramTable(
     georaster    IN OUT SDO_GEORASTER, 
     layerNumber  IN NUMBER 
     tableName    IN VARCHAR2);

Description

Sets the histogram table for a layer in a GeoRaster object.

Note:

This procedure registers the histogram table name with GeoRaster; however, GeoRaster does not perform operations using the histogram table in the current release.

Parameters

georaster

GeoRaster object.

layerNumber

Number of the layer for which to set the name of the histogram table. A value of 0 (zero) indicates the object layer.

tableName

Name of the histogram table. If this parameter is null, the metadata information for any existing histogram table (but not the actual table) is deleted. If there is no statistics information for the layer, this parameter must be null. The parameter value cannot be an empty string (that is, it cannot be '').

Usage Notes

This procedure specifies a user-defined histogram table. SDO_GEOR_HISTOGRAM Object Type briefly discusses histograms.

To return the name of the histogram table for a layer, use the SDO_GEOR.getHistogramTable function.

An exception is raised if one or more of the following are true:

  • layerNumber is null or invalid for the GeoRaster object,.

  • tableName is an empty string ('').

  • The statistical data associated with the specified layer is not set.

    To set the statistical data for a layer, call the SDO_GEOR.setStatistics procedure.

Examples

The following example sets HIST1 as the histogram table for layer 3 of the GeoRaster object (GEORASTER column) in the row with the GEORID column value of 4 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=4 FOR UPDATE;
  sdo_geor.setHistogramTable(grobj, 3, 'HIST1');
  UPDATE georaster_table SET georaster = grobj WHERE georid=4;
  COMMIT;
END;
/