All Products
Search
Document Center

ApsaraDB RDS:ST_PixelAsPoint

Last Updated:Mar 28, 2026

Returns a point geometry for a specified pixel of a raster. Use ref_point to control whether the point is at the upper-left corner or the center of the pixel.

Syntax

geometry ST_PixelAsPoint(raster raster_obj,
    integer row default 0,
    integer column default 0,
    integer pyramid default 0,
    cstring ref_point default 'UPPERLEFT');

Parameters

ParameterDescription
raster_objThe raster to query.
rowThe row index of the pixel, starting from 0 at the upper-left corner.
columnThe column index of the pixel, starting from 0 at the upper-left corner.
pyramidThe pyramid level of the pixel.
ref_pointThe reference position of the returned point within the pixel. Valid values: UPPERLEFT (default) — upper-left corner of the pixel; CENTER — center of the pixel.

Example

The following example returns the upper-left corner point of the pixel at row 10, column 10, pyramid level 0.

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

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