ST_Raster.buildPyramid
Definition
The ST_Raster buildPyramid function builds the pyramids of the ST_Raster object. This function is intended for SQL UPDATE statements only. A database error is returned when used in a SELECT statement.
Syntax
Oracle
buildPyramid () RETURN ST_RASTER buildPyramid (parameter_list IN VARCHAR2) RETURN ST_RASTER
PostgreSQL
buildPyramid (raster IN ST_Raster) buildPyramid (raster IN ST_Raster, parameter_list IN TEXT)
SQL Server
buildPyramid (parameter_list IN NVARCHAR)
Returns
ST_Raster
Parameters
parameter_list—A comma-delimited list of parameters enclosed in single quotes; if the parameter list is not supplied, the level is set to 0 (deletes any existing pyramid). The parameter list may include the following parameters:
- level <value>—The top pyramid level to be built; defaults to -1, which directs the function to automatically determine the maximum pyramid level. To remove the pyramid, set this parameter to 0.
- skipLevel1—Directs the function to not store the first pyramid level
- nearest | bilinear | bicubic—The interpolation algorithm used to build the pyramid; default is nearest
- quality <value>—If the compression type of the base layer is JPEG or JPEG 2000, the compression quality of the pyramids is controlled by setting this parameter. The default for JPEG compression is 75, while the default for JPEG 2000 compression is 0.
- bitrate <value>—The bit rate for JPEG 2000 compression
- log <logfile name>—The log file captures the results of the buildPyramid function.
Examples
These examples show the following:
- The first is a statement that builds raster pyramids for all ST_Raster objects in a user-defined table with bilinear interpolation and the default automatic pyramid level option.
- In the second example, the raster pyramids for all ST_Raster objects in the nova table are removed by setting the pyramid level to 0.
- In the final example, the first level of the pyramid is not stored; only the second and greater levels are. In addition, the pyramid is created with bilinear interpolation rather than the default, nearest neighbor.
Oracle
UPDATE NOVA SET image = image.buildPyramid('bilinear');
UPDATE NOVA SET image = image.buildPyramid('level=0');
UPDATE NOVA SET image = image.buildPyramid('skipLevel1,bilinear');
PostgreSQL
UPDATE nova SET image = buildPyramid(image,'bilinear');
UPDATE nova SET image = buildPyramid(image,'level=0');
UPDATE nova SET image = buildPyramid(image,'skipLevel1,bilinear');
SQL Server
UPDATE nova SET image = image.buildPyramid('bilinear');
UPDATE nova SET image = image.buildPyramid('level=0');
UPDATE nova SET image = image.buildPyramid('skipLevel1,bilinear');
3/6/2012