I have a raster table with index created by raster2pgsql
CREATE TABLE tbl (rid serial PRIMARY KEY, rast raster);
CREATE INDEX ON tbl USING gist (st_convexhull(rast));
I can see the best way to fetch a single point value is
SELECT ST_Value(rast, :point) FROM tbl WHERE ST_ConvexHull(rast) ~ :point;
However, given the structure and the functions I can see, it's not obvious how to best fetch e.g. 1000 point values at once. Neither from a single tile, not if they span across tiles.
I had an initial try with MULTIPOINT
geometry, but they don't work with ST_Value
, and I didn't know where to start with the WHERE
clause.