すべてのプロダクト
Search
ドキュメントセンター

ApsaraDB RDS:ST_InterpolateRaster

最終更新日:Mar 28, 2026

一連の 3D ポイントに基づいて空間補間を実行し、結果を新しいラスターオブジェクトとして返します。3D ポイントは (x, y, z) 形式で表されます。

構文

raster ST_InterpolateRaster(
    geometry input_points,
    integer width,
    integer height,
    cstring interpolateOptions,
    cstring storageOptions);

パラメーター

パラメーター説明
input_points補間ポイントのセットです。
widthラスターデータの列数です。
heightラスターデータの行数です。
interpolateOptions空間補間アルゴリズムの設定を記述する JSON 文字列です。
storageOptionラスターオブジェクトの保存に使用するチャンクを記述する JSON 文字列です。

次の表は、interpolateOptions パラメーターのフィールドについて説明しています。

フィールド説明タイプデフォルト値設定内容
method補間メソッドです。文字列IDW逆距離加重法 (IDW) 補間のみがサポートされています。
radius検索半径です。double0.0値が 0 の場合、検索半径は入力ポイント数とエリアに基づいて計算されます。
power補間の重みです。double2.0なし。
max_points最大ポイント数です。integer10min_points フィールドの値より大きくする必要があります。
min_points最小ポイント数です。integer2なし。
nodataノーデータ値です。double0.0なし。
parallel並列処理の次数 (DOP) です。integer1なし。

次の表は、storageOption パラメーターのフィールドについて説明しています。

フィールド説明タイプフォーマットデフォルト値備考
chunkdim各チャンクのサイズです。文字列(w, h, b)元のオブジェクトの各チャンクのサイズと同じです。なし。
chunktableチャンクテーブルの名前です。文字列なし。なし。このフィールドが指定されていない場合、一時テーブルが作成されます。
celltypeラスターオブジェクトのピクセルタイプです。文字列なし。16BUI有効な値:8BSI8BUI16BSI16BUI32BSI32BUI32BF64BF

使用例

次の例では、point_table から ST_Collect を使用して 3D ポイントを集約し、検索半径 3.0 の IDW を用いて 256×256 のラスターに補間します。

SELECT ST_InterpolateRaster(
  st_collect(ST_MakePoint(st_x(geom),st_y(geom),value)),
  256,
  256,
  '{"method":"IDW","radius":"3.0","max_points":"4","min_points":"1"}',
  '{"chunktable":"rbt","celltype":"8bui"}')
FROM point_table;

st_interpolateraster
---------------------
{"attributes":{"id":"f54cff0a-cca4-4e51-ac11-7aa5a3c9d9b6","name":"","type":"normal","version":1.1,"storage":{"mode":"internal","location":"rbt","md5":"","endian":"ndr","compress":"lz4","compressQuality":75,"fileSystem":"null","chunking":{"enable":true,"chunkHeight":256,"chunkWidth":256,"chunkBand":1,"rowChunksDimension":1,"columnChunksDimension":1,"bandChunksDimension":1},"cellType":"8bui","interleaving":"bsq"},"description":"","width":256,"height":256,"bands":1,"pyramid":{"resample":"near","level":0,"table":""},"overview":{"table":"","column":"","pyramidLevel":1},"referenceOriginPoint":{"type":"Raster","ulp":{"row":0,"column":0,"band":0},"rrp":{"row":0,"column":0,"band":0},"wrp":{"x":0,"y":0,"z":0}}},"spatialReference":{"valid":true,"srid":0,"refLocation":"center","affline":{"upperleftx":0.0,"upperlefty":2.0,"scalex":0.0078125,"scaley":-0.0078125,"skewx":0.0,"skewy":0.0},"gcps":{"count":0}}}

次の例では、parallel4 に設定して、並列処理の次数 (DOP) 4 で並列補間を有効にします。

SELECT ST_InterpolateRaster(
  st_collect(ST_MakePoint(st_x(geom),st_y(geom),value)),
  256,
  256,
  '{"radius":"2.0","max_points":"4","min_points":"1","parallel":"4"}',
  '{"chunktable":"rbt","celltype":"8bui"}')
FROM point_table;

st_interpolateraster
---------------------
{"attributes":{"id":"b769c306-4416-4e31-9e60-d2b847642190","name":"","type":"normal","version":1.1,"storage":{"mode":"internal","location":"rbt","md5":"","endian":"ndr","compress":"lz4","compressQuality":75,"fileSystem":"null","chunking":{"enable":true,"chunkHeight":256,"chunkWidth":256,"chunkBand":1,"rowChunksDimension":1,"columnChunksDimension":1,"bandChunksDimension":1},"cellType":"8bui","interleaving":"bsq"},"description":"","width":256,"height":256,"bands":1,"pyramid":{"resample":"near","level":0,"table":""},"overview":{"table":"","column":"","pyramidLevel":1},"referenceOriginPoint":{"type":"Raster","ulp":{"row":0,"column":0,"band":0},"rrp":{"row":0,"column":0,"band":0},"wrp":{"x":0,"y":0,"z":0}}},"spatialReference":{"valid":true,"srid":0,"refLocation":"center","affline":{"upperleftx":0.0,"upperlefty":2.0,"scalex":0.0078125,"scaley":-0.0078125,"skewx":0.0,"skewy":0.0},"gcps":{"count":0}}}