<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.m-2100610813396741032m417160081739070732gmail-pln
{mso-style-name:m_-2100610813396741032m_417160081739070732gmail-pln;}
span.m-2100610813396741032m417160081739070732gmail-pun
{mso-style-name:m_-2100610813396741032m_417160081739070732gmail-pun;}
span.m-2100610813396741032m417160081739070732gmail-
{mso-style-name:m_-2100610813396741032m_417160081739070732gmail-;}
span.m-2100610813396741032m417160081739070732gmail-m-2403125821986378161im
{mso-style-name:m_-2100610813396741032m_417160081739070732gmail-m_-2403125821986378161im;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks for bringing this to our attention.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I've ticketed it - https://trac.osgeo.org/postgis/ticket/3738<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Pierre and Bborie,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Were you aware of this behavior? This is the first time I'm hearing of it.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Though that would explain one complaint I heard from someone that their raster2pgsql outdb took 10 times longer than in-db<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>When for me it's always been really fast.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I would consider this a bug that –s could be used for both setting the SRID and also transforming data and would like the behavior changed in 2.4.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Probably too late to change for 2.3 since it's an api change, but we can put a warning on at least 2.3 as Tumasgiu suggested.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Regina<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><a href="http://postgis.us">http://postgis.us</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><a href="http://postgis.net">http://postgis.net</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Tumasgiu Rossini<br><b>Sent:</b> Tuesday, April 11, 2017 8:32 AM<br><b>To:</b> PostGIS Users Discussion <postgis-users@lists.osgeo.org><br><b>Subject:</b> Re: [postgis-users] Fwd: PostGIS Out-DB Raster Not Behaving As Expected<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><div><div><p class=MsoNormal style='margin-left:.5in'>Maybe a warning showing up when using -s and -R options together could be a nice thing to do ?<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>Or maybe implementing another option which would use st_setsrid instead of st_transform.<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:.5in'>2017-04-11 14:25 GMT+02:00 Tumasgiu Rossini <<a href="mailto:rossini.t@gmail.com" target="_blank">rossini.t@gmail.com</a>>:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>Hi,<o:p></o:p></p></div><p class=MsoNormal style='margin-left:.5in'>I think I found the probelm, it is the -s option which make the sql<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'>applying a st_transfrom on the raster to reproject it into the desired CRS<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'>before inserting it in the table, thus creating an in-db raster.<o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:.5in'>2017-04-11 12:14 GMT+02:00 Osahon Oduware <<a href="mailto:osahon.gis@gmail.com" target="_blank">osahon.gis@gmail.com</a>>:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><p class=MsoNormal style='margin-left:.5in'>Hi Regina,<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'>I would like to add that the SHOW command below returns "on": <o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><pre style='margin-left:.5in;background:#EFF0F1;max-height:600px;word-wrap:normal;overflow:auto'><span class=m-2100610813396741032m417160081739070732gmail-pln><span style='font-family:Consolas;color:#303336;border:none windowtext 1.0pt;padding:0in'>SHOW postgis</span></span><span class=m-2100610813396741032m417160081739070732gmail-pun><span style='font-family:Consolas;color:#303336;border:none windowtext 1.0pt;padding:0in'>.</span></span><span class=m-2100610813396741032m417160081739070732gmail-pln><span style='font-family:Consolas;color:#303336;border:none windowtext 1.0pt;padding:0in'>enable_outdb_rasters</span></span><span class=m-2100610813396741032m417160081739070732gmail-pun><span style='font-family:Consolas;color:#303336;border:none windowtext 1.0pt;padding:0in'>;</span></span><span style='font-family:Consolas;color:#393318'><o:p></o:p></span></pre></div><div><p class=MsoNormal style='margin-left:.5in'>which I believe indicates that the environment variable is SET to enable out-db raster. However, the result from your 1st query shows that the raster table isn't created with out-db. Any reason for this behaviour?<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:.5in'>---------- Forwarded message ----------<br>From: <b>Osahon Oduware</b> <<a href="mailto:osahon.gis@gmail.com" target="_blank">osahon.gis@gmail.com</a>><br>Date: Tue, Apr 11, 2017 at 10:07 AM<br>Subject: Re: [postgis-users] PostGIS Out-DB Raster Not Behaving As Expected<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>><br>Cc: Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>>, Jorge Gustavo Rocha <<a href="mailto:jgr@di.uminho.pt" target="_blank">jgr@di.uminho.pt</a>><br><br><o:p></o:p></p><div><p class=MsoNormal style='margin-left:.5in'>Hi Regina,<o:p></o:p></p><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'>I have tried the queries above. For the related raster table,<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.5pt'>SELECT r_table_name, r_raster_column, out_db FROM raster_columns; RETURNS</span><o:p></o:p></p></div><div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.5pt'>"raster_table","rast","[False, False, False]"</span><o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span class=m-2100610813396741032m417160081739070732gmail-><span style='font-size:9.5pt'>SELECT t.rid, (md).isoutdb, (md).path</span></span><span style='font-size:9.5pt'><br><span class=m-2100610813396741032m417160081739070732gmail->FROM nj_ned AS t, ST_BandMetaData(t.rast) AS md</span><br>limit 1; RETURNS</span><o:p></o:p></p></div><div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.5pt'>1,False,""</span><o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.5pt'>I believe from the result of the 1st query that out-db is not enabled. However, the environment variable POSTGIS_ENABLE_OUTDB_RASTERS is SET to 1.<b> I have tried to also enable it with the following, restarted the postgres Service, and re-loaded the raster, but the 1st query gives the same result:</b></span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.5pt'>ALTER DATABASE <database_name> SET postgis.enable_outdb_rasters TO True;</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'>Please, could you help me further on what I am not doing right to enable the out-db rasters.<o:p></o:p></p></div><div><div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:.5in'>On Mon, Apr 10, 2017 at 8:31 PM, Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in'>You should also check the following queries<br><br>SELECT r_table_name, r_raster_column, out_db FROM raster_columns;<br><br>Out_db should be true for all your bands for the specific table and as Jorge mentioned, you shouldn't see any over view tables (which start with o_..{table}.<br>I believe QGIS internally tries to use over view tables to speed things up, so it's possible it's using an overview table instead of the main outdb table if you are zoomed out enough.<br><br>For outdb, querying the meta data of the raster will tell you the path if it's an outdb. Replace nj_ned with your table name.<br><br>SELECT t.rid, (md).isoutdb, (md).path<br>FROM nj_ned AS t, ST_BandMetaData(t.rast) AS md<br>limit 1;<br><br>Hope that helps,<br>Regina<br><a href="http://postgis.us" target="_blank">http://postgis.us</a><br><a href="http://postgis.net" target="_blank">http://postgis.net</a><br><br><br>-----Original Message-----<br>From: postgis-users [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>] On Behalf Of Jorge Gustavo Rocha<br>Sent: Monday, April 10, 2017 2:14 PM<br>To: <a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>Subject: Re: [postgis-users] PostGIS Out-DB Raster Not Behaving As Expected<br><br>Hi,<br><br>According to the documentation [1], if you add the option -l (like -l<br>2,4,8,16 ), the overviews are created in the database, even if you use the -R option.<br><br>But since you did not use the -l option, I don't know how you can see the images.<br><br>Can you check the layer properties in QGIS? Are any pyramids available or not?<br><br>Regards,<br><br>Jorge<br><br><br> s 16:52 de 10-04-2017, Osahon Oduware escreveu:<br>> Hi All,<br>><br>> I created an out-db raster using the following syntax:<br>><br>> raster2pgsql -s {srid} -c -R -I -C -F -t auto {absolute_file_path}<br>> public.{table} | psql -h {host} -p {port} -d {database} -U {user}<br>><br>> The table was created successfully. I wanted to confirm that the<br>> actual file is being read from the location in the filesystem by<br>> performing the following steps:<br>> 1) I moved the raster file to a different location.<br>> 2) I opened QGIS and attempted to load the raster from PostGIS table.<br>><br>> I was surprised that QGIS could load the file. *How is this possible<br>> when the actual raster data is not stored in the database table?*<br>><br>><br>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>><br><br>J. Gustavo<br>--<br>Jorge Gustavo Rocha<br>Departamento de Inform tica<br>Universidade do Minho<br>4710-057 Braga<br>Tel: <a href="tel:+351%20253%20604%20480" target="_blank">+351 253604480</a><br>Fax: <a href="tel:+351%20253%20604%20471" target="_blank">+351 253604471</a><br>M vel: <a href="tel:+351%20910%20333%20888" target="_blank">+351 910333888</a><br><span class=m-2100610813396741032m417160081739070732gmail-m-2403125821986378161im>skype: nabocudnosor</span><br><span class=m-2100610813396741032m417160081739070732gmail-m-2403125821986378161im>_______________________________________________</span><br><span class=m-2100610813396741032m417160081739070732gmail-m-2403125821986378161im>postgis-users mailing list</span><br><span class=m-2100610813396741032m417160081739070732gmail-m-2403125821986378161im><a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a></span><br><span class=m-2100610813396741032m417160081739070732gmail-m-2403125821986378161im><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></span><o:p></o:p></p><div><div><p class=MsoNormal style='margin-left:.5in'>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div></div></div></div></div></div></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><p class=MsoNormal style='margin-left:.5in'><br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></p></blockquote></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div></div></div></blockquote></div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div></div></body></html>