4.10 Compressing and Decompressing GeoRaster Objects

You can reduce the storage space requirements for GeoRaster objects by compressing them using JPEG-F, DEFLATE, or JPEG 2000 compression. You can decompress any compressed GeoRaster object, although this is not required for any GeoRaster operations, because any GeoRaster operation that can be performed on an uncompressed (decompressed) GeoRaster object can be performed on a compressed GeoRaster object.

For JPEG-F and DEFLATE, to compress or decompress a GeoRaster object, use the compression keyword in the storageParam parameter with the SDO_GEOR.changeFormatCopy procedure, or with several other procedures that load and process a GeoRaster object to create another GeoRaster object, including SDO_GEOR.mosaic, SDO_GEOR.scaleCopy, SDO_GEOR.subset, raster algebra (SDO_GEOR_RA) procedures, and SDO_GEOR_AGGR.mosaicSubset. (For JPEG-F and DEFLATE compression, there are no separate procedures for compressing and decompressing a GeoRaster object.)

For JPEG 2000, use the SDO_GEOR.compressJP2 and SDO_GEOR.decompressJP2 procedures to compress and decompress a GeoRastrer object, respectively. Most other procedures and functions (except for SDO_GEOR.changeCellValue, SDO_GEOR.reproject, sdo_geor.scaleScopy, and sdo_geor.mosaic) can internally decompress the JP2 compressed GeoRaster object while performing the operation.

For more information about GeoRaster compression and decompression, see Compression and Decompression, including information about support for third-party compression solutions in Third-Party Plug-ins for Compression.

In addition, when JPEG-F or DEFLATE compression is used with GeoRaster objects, some special usage considerations apply:

  • If a large GeoRaster object is to be compressed and will have full pyramids built on it, it is faster to generate pyramids on the uncompressed GeoRaster object first, then apply compression.

  • For large scale mosaicking, it is faster to mosaic without applying compression first, then generate pyramids, then apply compression.

  • In some operations, GeoRaster uses temporary tablespaces to compress and decompress data, so adding temporary tablespaces for GeoRaster users is essential for performance (see Adding Temporary Tablespaces for GeoRaster Users).

Parallel compression and decompression for JPEG and DEFLATE are supported with the SDO_GEOR.changeFormatCopy procedure, if reformatting is not needed, by using the parallel keyword in the storageParam parameter. You can also call the SDO_GEOR_AGGR.mosaicSubset procedure, which provides better performance if you want to change the raster format while doing parallelized compression or decompression. Parallel compression and decompression significantly improve performance, which is especially useful for large images. See Example 6-23 in Parallel Compression, Copying, and Subsetting

If you want to store compressed GeoRaster objects, make sure you create a temporary tablespace for the users. For more information, see Adding Temporary Tablespaces for GeoRaster Users.