[postgis-users] out db: not able to query the raster

andy aborruso at gmail.com
Mon Dec 4 14:23:31 PST 2023


Hi,
if I run "SELECT (ST_BandMetaData(rast)).* FROM rasters_outdb LIMIT 1;", in
the field path I have "/directory_docker/ou_s6_01_01_stack.tif"

If I run "ls -l /directory_docker/ou_s6_01_01_stack.tif" I have

-rwxr--r-- 1 1000 1000 2100227 Dec  4 08:32
/directory_docker/ou_s6_01_01_stack.tif

But when I run "SELECT ST_Value(rast, 1, 1) FROM rasters_outdb;" I get

ERROR:  rt_band_load_offline_data: Cannot open offline raster:
/directory_docker/ou_s6_01_01_stack.tif

Why is it offline? It's there.
I'm using postgis/postgis:16-master

I have created the sql file to load it in postgres, running

raster2pgsql -I -C -M -F -t auto -R /directory_docker/ou_s6_01_01_stack.tif
public.rasters_outdb

How to read the pixel values using a PG SQL query?

Thank you

-- 
___________________

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326
___________________

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno,
e farlo durare, e dargli spazio"

Italo Calvino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20231204/3c765ff5/attachment.htm>


More information about the postgis-users mailing list