全部產品
Search
文件中心

ApsaraDB RDS:ST_PixelAsCentroid

更新時間:Feb 28, 2024

將柵格像素轉換為基於中心點方式的表述的幾何對象。

文法

geometry ST_PixelAsPoint(raster raster_obj,
    integer row default 0,
    integer column default 0,
    integer pyramid default 0) ;

參數

參數名稱描述
raster_obj需要轉換的raster對象。
row像素所處的行號,以左上方點為起始點,從0開始。
column像素所處的列號,以左上方點為起始點,從0開始。
pyramid像素所在的金字塔層級。

描述

將柵格像素轉換為基於中心點方式的表述的幾何對象,等同於ST_PixelAsPointref_point參數為CENTER

樣本

SELECT ST_AsText(ST_PixelAsCentroid(rast, 10, 10))
FROM rast_table
WHERE id = 10;

------------------
POINT(-178.2 88.2)