7.11 SDO_GEOR.createTemplate

Format

SDO_GEOR.createTemplate(
     georaster    IN OUT SDO_GEORASTER, 
     rasterType   IN INTEGER, 
     rasterSpec   IN VARCHAR2, 
     maskLayers   IN VARCHAR2 DEFAULT NULL, 
     initRDTEntry IN VARCHAR2 DEFAULT NULL); 

Description

Populates a GeoRaster object with metadata of a general pattern, and optionally inserts entries with empty raster blocks into its raster data table.

Parameters

georaster

The GeoRaster object to be updated.

rasterType

The 5-digit rasterType attribute value, as specified in rasterType Attribute.

rasterSpec

A string with raster specification parameters, as explained in the Usage Notes.

maskLayers

A string identifying the logical layer numbers on which there are associated bitmap masks. Use commas to delimit the values, and a hyphen to indicate a range (for example, 2-4 for layers 2, 3, and 4).

initRDTEntry

The string TRUE causes the raster data table to be populated; the string FALSE causes the raster data table not to be populated. If you do not specify this parameter, the raster data table is not populated.

Usage Notes

This function populates a GeoRaster object with metadata of a general pattern and optionally inserts proper rows (with empty raster blocks) into its raster data table. If the raster data table is to be populated, the raster data table must exist and the GeoRaster object must have been registered in the GeoRaster SYSDATA table.

In general, only use this procedure with an empty GeoRaster object to populate its XML metadata and raster blocks. If you use an existing (good) GeoRaster object, the GeoRaster object will be replaced with the new template object upon update.

The rasterSpec parameter must be a quoted string that contains one or more keyword-value pairs. The following keywords are supported for this parameter:

  • blocking (for example, blocking=TRUE). For an explanation of this keyword, see Table 1-1 in Storage Parameters.

  • blocksize (for example, blocksize=(512,512,3)). For an explanation of this keyword, see Table 1-1 in Storage Parameters.

  • cellDepth (for example, cellDepth=8BIT_S). For an explanation of this keyword, see Table 1-1 in Storage Parameters.

  • compression (for example, compression=JPEG-F). For an explanation of this keyword, see Table 1-1 in Storage Parameters.

  • dimSize (for example, dimSize=(512,512,3)): Specifies the row, column, and band dimension sizes. This keyword must be specified and must be consistent with the rasterType parameter.

  • interleaving (for example, interleaving=BIP). For an explanation of this keyword, see Table 1-1 in Storage Parameters.

  • quality (for example, quality=75). For an explanation of this keyword, see Table 1-1 in Storage Parameters.

  • resampling (for example, resampling=NN): Specifies the resampling method. Must be one of the following: NN, BILINEAR, BIQUADRATIC, CUBIC, AVERAGE4, AVERAGE16. For more information, see Resampling and Interpolation.

    The resampling keyword is ignored if rLevel is not set.

  • rLevel (for example, rLevel=2): Specifies the maximum pyramid reduction level. Must be a positive integer. If you specify this keyword, the pyramid type is set to DECREASE in the metadata; otherwise, the pyramid type is set to NONE.

  • ultCoord (for example, ultCoord=(0,0,0)): Specifies the upper-left coordinate integer values for the GeoRaster object. The default value is 0 for all the dimensions. The value for the band dimension must be 0.

(Note that the following keywords in Table 1-1 in Storage Parameters are not supported for the rasterSpec parameter: bitmapmask and pyramid.)

If the compression keyword in the rasterSpec parameter is set as JP2-F, the blocking defaults to non-blocking no matter what the rasterSpec parameter specifies. If the rlevel keyword in the rasterSpec parameter is not set and compression is JP2-F, the pyramid maximum level in the GeoRaster metadata defaults to floor( log2(imageSize)), where imageSize is the minimum of the image row and column size. The pyramid maximum level should be adjusted later if the actual data has different levels of resolutions.

For more information about using this function in developing GeoRaster applications, see Using Template-Related Subprograms to Develop GeoRaster Applications.

Examples

The following example populates a GeoRaster object with metadata and initial raster data table rows.

DECLARE
  gr sdo_georaster;
BEGIN
  INSERT INTO georaster_table (georid, georaster)
    VALUES (1, sdo_geor.init('RDT_1'))
    RETURNING georaster into gr;
  sdo_geor.createTemplate(gr, 21001,
                       'dimSize=(512,512,3) blocking=false rlevel=2',
                       null, 'TRUE');
  UPDATE georaster_table set georaster=gr where georid=1;
  COMMIT;
END;
/