ST_Raster.getCompressionType
Definition
The ST_Raster.getCompressionType function returns the compression property used to store the data in the ST_Raster. Valid values are as follows:
- NONE—No compression was used to store the data.
- LZ77—LZ77 run length compression that is lossless and is best used on data of low variability, or where other compression algorithms cannot be used.
- JPEG—Stands for Joint Photographic Experts Group, the committee that developed the compression standard; it is lossy and typically obtains between 5 to 1 and 10 to 1 compression.
- JP2—JPEG 2000 wavelet-based compression achieves between 5 to 1 and 10 to 1 compression.
Syntax
Oracle
getCompressionType()
PostgreSQL
getCompressionType(raster IN ST_RASTER)
SQL Server
getCompressionType()
Returns
Oracle
VARCHAR2
PostgreSQL
Text
SQL Server
NVARCHAR
Parameters
None
Examples
The following queries return the compression type for each raster in the table:
Oracle
SELECT image.raster_id, image.getCompressionType() FROM FOO t; T.IMAGE.RASTER_ID T.IMAGE.GETCOMPRESSIONTYPE() --------------- -------------------------- 2 LZ77 3 LZ77 23 JP2 24 JP2 42 LZ77 43 LZ77
PostgreSQL
SELECT raster_id(image), getCompressionType(image) FROM foo; RASTER_ID(IMAGE) GETCOMPRESSIONTYPE(IMAGE) ---------------- ------------------------- 2 LZ77 3 LZ77 23 JP2 24 JP2 42 LZ77 43 LZ77
SQL Server
SELECT image.raster_id, image.getCompressionType() FROM foo; IMAGE.RASTER_ID IMAGE.GETCOMPRESSIONTYPE() --------------- -------------------------- 2 LZ77 3 LZ77 23 JP2 24 JP2 42 LZ77 43 LZ77
2/5/2013