7.12 SDO_GEOR.decompressJP2

Format

SDO_GEOR.decompressJP2(
     inGeoRaster   IN SDO_GEORASTER, 
     pyramidLevel  IN NUMBER DEFAULT 0, 
     cropArea      IN SDO_NUMBER_ARRAY DEFAULT NULL, 
     bandNumbers   IN VARCHAR2, 
     storageParam  IN VARCHAR2, 
     outGeoraster  IN OUT SDO_GEORASTER);

or

SDO_GEOR.decompressJP2(
     inGeoRaster   IN SDO_GEORASTER, 
     pyramidLevel  IN NUMBER DEFAULT 0, 
     cropArea      IN SDO_GEOMETRY DEFAULT NULL, 
     layerNumbers  IN VARCHAR2, 
     storageParam  IN VARCHAR2, 
     outGeoraster  IN OUT SDO_GEORASTER);

Description

Decompress the JPEG 2000 compressed GeoRaster image into a GeoRaster object.

Parameters

inGeoRaster

The SDO_GEORASTER object to be decompressed.

pyramidLevel

A number specifying the pyramid level to be decompressed in the source GeoRaster object.

cropArea

Crop area definition. If the data type is SDO_NUMBER_ARRAY, the parameter identifies the upper-left (row, column) and lower-right (row, column) coordinates of a rectangular window, and raster space is assumed. If the data type is SDO_GEOMETRY, the minimum bounding rectangle (MBR) of the geometry object is used as the crop area; see also the Usage Notes for SDO_SRID requirements.

If cropArea is of type SDO_GEOMETRY, use the layerNumbers parameter to specify one or more layer numbers; if cropArea is of type SDO_NUMBER_ARRAY, use the bandNumbers parameter to specify one or more band numbers.

bandNumbers

A string identifying the physical band numbers on which the operation is to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 1-3 for bands 1, 2, and 3).

layerNumbers

A string identifying the logical layer numbers on which the operation is to be performed. Use commas to delimit the values, and a hyphen to indicate a range (for example, 2-4 for layers 2, 3, and 4).

storageParam

A string specifying storage parameters, as explained in Storage Parameters.

outGeoRaster

The output SDO_GEORASTER object that reflects the results of the operation. Must be either a valid existing GeoRaster object or an empty GeoRaster object. (Empty GeoRaster objects are explained in Blank and Empty GeoRaster Objects.) Cannot be the same GeoRaster object as inGeoRaster.

Usage Notes

In the storageParam parameter, any bitmapmask, compression, quality, and pyramid keywords are ignored.

If the cropArea parameter data type is SDO_GEOMETRY, the SDO_SRID value must be one of the following:

  • Null, to specify raster space

  • A value from the SRID column of the MDSYS.CS_SRS table

    If the SDO_SRID values for the cropArea parameter geometry and the model space are different, the window parameter geometry is automatically transformed to the coordinate system of the model space before the operation is performed. (Raster space and model space are explained in GeoRaster Data Model.)

Examples

The following example creates an uncompressed GeoRaster object that contains only specified bands from a specified window from the original object. The original object’s raster data is compressed in JPEG 2000 compression. (It refers to a table named GEORASTER_TABLE, whose definition is presented after Example 1-1 in Storage Parameters.)

DECLARE
  gr1 sdo_georaster;
  gr2 sdo_georaster;
BEGIN
  INSERT INTO georaster_table (georid, georaster)
    VALUES (41, sdo_geor.init('RDT_1'))
    RETURNING georaster INTO gr2;

  SELECT georaster INTO gr1 FROM georaster_table WHERE georid=4;

  sdo_geor.decompressJP2(gr1, 0, sdo_geometry(2003, NULL, NULL,
                               sdo_elem_info_array(1, 1003, 3),
                               sdo_ordinate_array(0,256,255,511)),
                  '3,1-2',’blocksize=(512, 512, 3)’, gr2);
  UPDATE georaster_table SET georaster=gr2 WHERE georid=41;
  COMMIT;
END;
/