All Products
Search
Document Center

PolarDB:ST_PixelAsPoint

Last Updated:Mar 28, 2026

Returns a point geometry for a specified pixel in a raster. By default, the point is placed at the upper-left corner 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 pixel row index (y-axis). Valid values start from 0, which is the upper-left corner of the raster.
columnThe pixel column index (x-axis). Valid values start from 0, which is the upper-left corner of the raster.
pyramidThe pyramid level of the pixel.
ref_pointThe reference position of the returned point within the pixel. Valid values: UPPERLEFT (upper-left corner of the pixel) and CENTER (center of the pixel). Default: UPPERLEFT.

Example

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

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