Skip to main content
Returns the value at the given point in the raster. If no band number is specified it defaults to 1.
Since v1.5.1, if the coordinate reference system (CRS) of the input point geometry differs from that of the raster, then point will be transformed to match the CRS of the raster. If the raster or point doesn’t have a CRS then it will default to 4326/WGS84.

Signatures

RS_Value (raster: Raster, point: Geometry)
RS_Value (raster: Raster, point: Geometry, band: Integer)
RS_Value (raster: Raster, colX: Integer, colY: Integer, band: Integer)

Parameters

raster
Raster
required
The input raster.
colX
Integer
The col x value.
colY
Integer
The col y value.
band
Integer
The band index.
point
Geometry
The point value.

Return type

A numeric value.

Examples

SELECT RS_Value(raster, ST_Point(-13077301.685, 4002565.802)) FROM raster_table
  • For Grid Coordinates:
SELECT RS_Value(raster, 3, 4, 1) FROM raster_table
5.0