Trong khi ST_Value hoạt động, bạn vẫn cần tham gia theo không gian:
SELECT ST_Value(your_raster.rast, ST_Transform(ST_SetSRID(ST_MakePoint(lon,lat),4326),3035))
FROM your_raster
WHERE ST_Intersects(your_raster.rast, ST_SetSRID(ST_MakePoint(lon,lat),4326),3035))
Hoặc với một bảng:
SELECT ST_Value(your_raster.rast, ST_Transform(ST_SetSRID(ST_MakePoint(your_table.lon,your_table.lat),4326),3035))
FROM your_raster
JOIN your_table ON ST_Intersects(your_raster.rast, ST_SetSRID(ST_MakePoint(your_table.lon,your_table.lat),4326),3035))