Skip to main content
Returns a point geometry of the specified pixel’s upper-left corner. The pixel coordinates specified are 1-indexed. RS_PixelAsPoint
If the pixel coordinates specified do not exist in the raster (out of bounds), RS_PixelAsPoint throws an IndexOutOfBoundsException.

Signatures

RS_PixelAsPoint(raster: Raster, colX: Integer, rowY: Integer)

Parameters

raster
Raster
required
The input raster.
colX
Integer
required
The col x value.
rowY
Integer
required
The row y value.

Return type

The resulting geometry.

Examples

SELECT ST_AsText(RS_PixelAsPoint(raster, 2, 1)) from rasters
POINT (123.19, -12)
SELECT ST_AsText(RS_PixelAsPoint(raster, 6, 2)) from rasters
IndexOutOfBoundsException: Specified pixel coordinates (6, 2) do not lie in the raster