13.1 SDO_GEOR_UTL.calcOptimizedBlockSize

Format

SDO_GEOR_UTL.calcOptimizedBlockSize(
     dimensionSize IN SDO_NUMBER_ARRAY, 
     blockSize     IN OUT SDO_NUMBER_ARRAY, 
     pyramidLevel  IN number default 0);

Description

Calculates an optimal blockSize value that will use less padding space in the GeoRaster object storage, based on the GeoRaster dimension sizes and the user-specified block size values.

Parameters

dimensionSize

Dimension size array of the GeoRaster object.

blockSize

Block size array, which holds the user-specified block size values and into which the procedure outputs the adjusted optimal block size values.

pyramidLevel

Maximum pyramid level. The default value is 0.

Usage Notes

This procedure enables you to give desired block size values (which may not be optimal), automatically adjust them, and then determine the block size array values for a specified GeoRaster dimension size array that will be optimal for reducing the amount of padding space in GeoRaster object storage. The adjustment is always made around the user-specified values. For more information, see the explanations of the blocking and blockSize keywords in Table 1-1 in Storage Parameters.

In the dimensionSize and blockSize parameter values, specify the values for the dimensions in this order: row, column, band.

An exception is generated if the input dimensionSize or blockSize parameter contains any invalid values.

Examples

The following example calculates and displays an optimal block size value, based on a specified dimension size array of (12371,11261,13) and a specified block size array of (512,512,5). Note that the optimal rowBlockSize value returned is 538 as opposed to the original value of 512, and the optimal bandBlockSize value returned is 1 as opposed to the original value of 5.

DECLARE
  dimensionSize    sdo_number_array;
  blockSize        sdo_number_array;
BEGIN
  dimensionSize:=sdo_number_array(12371,11261,13);
  blockSize:=sdo_number_array(512,512,5);
  sdo_geor_utl.calcOptimizedBlockSize(dimensionSize,blockSize);
  dbms_output.put_line('Optimized rowBlockSize = '||blockSize(1));
  dbms_output.put_line('Optimized colBlockSize = '||blockSize(2));
  dbms_output.put_line('Optimized bandBlockSize = '||blockSize(3));
END;
/
Optimized rowBlockSize = 538
Optimized colBlockSize = 512
Optimized bandBlockSize = 1