7.153 SDO_GEOR.setVAT

Format

SDO_GEOR.setVAT(
     georaster    IN OUT SDO_GEORASTER, 
     layerNumber  IN NUMBER, 
     vatName      IN VARCHAR2);

Description

Sets the name of the value attribute table (VAT) associated with a layer of a GeoRaster object, or deletes the existing value if you specify a null vatName parameter.

Parameters

georaster

GeoRaster object.

layerNumber

Number of the layer for which to perform the operation.

vatName

Name of the value attribute table.

Usage Notes

The GeoRaster object is automatically validated after the operation completes.

For more information about value attribute tables, see Geographic Information Systems.

To return the name of the value attribute table associated with a layer of a GeoRaster object, use the SDO_GEOR.getVAT function.

An exception is raised if layerNumber is null or invalid for the GeoRaster object, or if vatName is an empty string ('').

Examples

The following example specifies VATT1 as the value attribute table to be associated with 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.setVAT(grobj, 3, 'VATT1');
  UPDATE georaster_table SET georaster = grobj WHERE georid=4;
  COMMIT;
END;
/