7.142 SDO_GEOR.setRasterType

Format

SDO_GEOR.setRasterType(
     georaster   IN OUT SDO_GEORASTER, 
     rasterType  IN NUMBER);

Description

Sets the raster type of a GeoRaster object.

Parameters

georaster

GeoRaster object.

rasterType

Numeric value to be set as the rasterType attribute of the GeoRaster object. Must be a valid 5-digit numeric value, in the format described in rasterType Attribute.

Usage Notes

The GeoRaster object is automatically validated after the operation completes.

An exception is raised if rasterType is null or if the first three digits of the existing rasterType value are changed.

Examples

The following example sets the rasterType attribute value of a GeoRaster object to 20001. (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=2 FOR UPDATE;
  sdo_geor.setRasterType(grobj, 20001);
  UPDATE georaster_table SET georaster = grobj WHERE georid=2;
  COMMIT;
END;
/