Definition
The ST_Raster.getPyramidLevel function returns the maximum pyramid level of a raster. Level 0 is the full-resolution level, or base level.
Syntax
Oracle
getPyramidLevel()
PostgreSQL
getPyramidLevel(raster IN ST_RASTER)
SQL Server
getPyramidLevel()
Returns
Oracle
Number
PostgreSQL
Integer
SQL Server
Integer
Parameters
raster—ST_RASTER object to be tested
Examples
The following queries return the pyramid level for each raster in the table:
Oracle
SELECT image.raster_id, image.getPyramidLevel()
FROM FOO t;
T.IMAGE.RASTER_ID T.IMAGE.GETPYRAMIDLEVEL()
--------------- -----------------------
2 2
3 2
23 0
24 0
42 0
43 0
PostgreSQL
SELECT raster_id(image), getPyramidLevel(image)
FROM foo;
RASTER_ID(IMAGE) GETPYRAMIDLEVEL(IMAGE)
---------------- ----------------------
2 2
3 2
23 0
24 0
42 0
43 0
SQL Server
SELECT image.raster_id, image.getPyramidLevel()
FROM foo;
IMAGE.RASTER_ID IMAGE.GETPYRAMIDLEVEL()
--------------- -----------------------
2 2
3 2
23 0
24 0
42 0
43 0