创建影像金字塔。
语法
raster ST_BuildPyramid(raster source);
raster ST_BuildPyramid(raster source, cstring chunkTableName);
raster ST_BuildPyramid(raster source, integer pyramidLevel, ResampleAlgorithm algorithm,
cstring chunkTableName, cstring storageOption);
参数
参数名称 | 描述 |
---|---|
source | 需要创建金字塔的raster对象。 |
chunkTableName | 金字塔所存储的分块表名称。 |
pyramidLevel | 金字塔创建的层级, -1表示创建到最高层级。 |
algorithm | 创建金字塔的重采样算法,取值如下:
|
storageOption | 存储选项。该选项只针对基于对象存储OSS的栅格对象有效。 |
storageOption是基于JSON格式的字符串,描述raster对象金字塔的分块存储信息。支持的参数如下。
参数名称 | 类型 | 说明 |
---|---|---|
chunkdim | string | 分块的维度信息,格式为(w, h, b) ,默认从原始影像中读取分块大小。
|
interleaving | string | 交错方式,取值如下:
|
compression | string | 压缩算法类型,取值如下:
|
quality | integer | 压缩质量。只针对jpeg和jp2k压缩算法生效,默认值为75。 |
描述
创建金字塔支持GPU加速,如果运行环境带有GPU设备,则Ganos会自动开启GPU加速功能。
示例
Update raster_table set raster_obj = ST_BuildPyramid(raster_obj) where id = 1;
Update raster_table set raster_obj = ST_BuildPyramid(raster_obj, 'chunk_table') where id = 2;
--使用jp2k压缩,确保指定所有波段在一个分块内。
Update raster_table set raster_obj = ST_BuildPyramid(
raster_obj,
-1,
'Near',
'chunk_table',
'{"compression":"jp2k",
"quality": 75,
"chunkdim":"(256,256,4)",
"interleaving":"auto"}'
)
where id = 3;
在文档使用中是否遇到以下问题
更多建议
匿名提交