根據視口的全局座標範圍,長和寬來計算最佳的金字塔層級。
文法
integer ST_BestPyramidLevel(raster rast, Box extent, integer width, integer height );
參數
| 參數名稱 | 描述 |
| rast | 需要轉換的raster對象。 |
| box | 視口的世界空間座標範圍,格式為((minX,minY),(maxX,maxY))。 |
| width | 視口的像素寬度。 |
| height | 視口的像素高度。 |
描述
raster對象必須要有完整的空間參考資訊(srid值有效)。
樣本
Select ST_BestPyramidLevel(raster_obj, '((128.0, 30.0),(128.5, 30.5))', 800, 600) from raster_table where id = 10;
---------------------
3