根據(jù)視口的世界坐標(biāo)范圍,長(zhǎng)和寬來(lái)計(jì)算最佳的金字塔層級(jí)。

語(yǔ)法

integer ST_BestPyramidLevel(raster rast, Box extent, integer width, integer height );

參數(shù)

參數(shù)名稱 描述
rast 需要轉(zhuǎn)換的raster對(duì)象。
box 視口的世界空間坐標(biāo)范圍,格式為((minX,minY),(maxX,maxY))
width 視口的像素寬度。
height 視口的像素高度。

描述

raster對(duì)象必須要有完整的空間參考信息(srid值有效)。

示例

Select ST_BestPyramidLevel(raster_obj, '((128.0, 30.0),(128.5, 30.5))', 800, 600) from raster_table where id = 10;

---------------------
3