I have a large raster map which I loaded into postgis with 1000x1000 meter tiles... the corresponding table has about 200 rows, each row representing a tile. I want to get the raster value for a specific coordinate, but I don't know how to do that most efficiently.
I did something like:
select ST_Value(rast, ST_Transform(ST_GeomFromText('POINT(lat lon)',4326),mysrid)) from rasterdata;
but it gives me a lot of:
Attempting to get pixel value with out of range raster coordinates:...
messages because finally only one tile contains the coordinate that I'm searching for.