<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hi Andrea,</p>
    <p>I always put the raster somewhere below Postgresql
      data_directory.<br>
    </p>
    <p>psql<br>
      show data_directory;</p>
    <p>I hope it helps.</p>
    <p>Saluti,</p>
    <p>Jorge<br>
    </p>
    <div class="moz-cite-prefix">On 04/12/23 22:23, andy via
      postgis-users wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAHEdGZPw4kV3XXtn61APTp6GpEzZJbwVNX0_-=3DksiMhe8auA@mail.gmail.com">
      
      <div dir="ltr">Hi,
        <div>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"</div>
        <div><br>
        </div>
        <div>If I run "ls -l /directory_docker/ou_s6_01_01_stack.tif" I
          have<br>
          <br>
          -rwxr--r-- 1 1000 1000 2100227 Dec  4 08:32
          /directory_docker/ou_s6_01_01_stack.tif</div>
        <div><br>
        </div>
        <div>But when I run "SELECT ST_Value(rast, 1, 1) FROM
          rasters_outdb;" I get <br>
          <br>
          ERROR:  rt_band_load_offline_data: Cannot open offline raster:
          /directory_docker/ou_s6_01_01_stack.tif</div>
        <div><br>
        </div>
        <div>Why is it offline? It's there.</div>
        <div>I'm using postgis/postgis:16-master</div>
        <div><br>
        </div>
        <div>I have created the sql file to load it in postgres, running</div>
        <div><br>
        </div>
        <div>raster2pgsql -I -C -M -F -t auto -R
          /directory_docker/ou_s6_01_01_stack.tif public.rasters_outdb</div>
        <div><br>
        </div>
        <div>How to read the pixel values using a PG SQL query?</div>
        <div><br>
        </div>
        <div>Thank you<br clear="all">
          <div><br>
          </div>
          <span class="gmail_signature_prefix">-- </span><br>
          <div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">
                              <div>
                                <div dir="ltr">
                                  <div dir="ltr"><span style="font-size:small">___________________</span><br>
                                  </div>
                                  <div dir="ltr"><span style="font-size:small"><br>
                                    </span></div>
                                  <div dir="ltr">Andrea Borruso<br>
                                    website: <a href="https://medium.com/tantotanto" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://medium.com/tantotanto</a><br>
                                    38° 7' 48" N, 13° 21' 9" E,
                                    EPSG:4326<br>
                                    <span style="font-size:small">___________________</span><br>
                                    <br>
                                    "cercare e saper riconoscere chi e
                                    cosa,<br>
                                     in mezzo all’inferno, non è
                                    inferno, <br>
                                    e farlo durare, e dargli spazio"<br>
                                    <br>
                                    Italo Calvino<br>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/postgis-users">https://lists.osgeo.org/mailman/listinfo/postgis-users</a>
</pre>
    </blockquote>
  </body>
</html>