<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=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EstiloDeEmail17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
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=PT-BR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>I have two multiband raster files and i'm trying to load these data into PostGIS using<span class=apple-converted-space> “</span></span><span lang=EN-US style='font-family:"Helvetica","sans-serif";color:#333333'>raster2pgsql”</span><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>Here is the syntax that i used:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>raster2pgsql -c -s 4326 -I -t 100x100 *.tif  public.deforested_rasters | psql -d r342471958<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><o:p> </o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;vertical-align:baseline'><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>It works without error, but i don't know if the command loads correctly both raster files. The database in PostGIS has two columns, one with the spatial index and the other one with raster information. I'm trying to visualize the resultant database in QGIS, but for some reason it doesn't open the raster layer.<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;vertical-align:baseline;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;background-color:rgba(248, 248, 248, 0.6);word-spacing:0px'><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>I've tried to solve this problem using this idea:<span class=apple-converted-space> </span></span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><a href="https://duncanjg.wordpress.com/2012/11/20/the-basics-of-postgis-raster/"><span lang=EN-US style='color:#358DAA;border:none windowtext 1.0pt;padding:0cm'>https://duncanjg.wordpress.com/2012/11/20/the-basics-of-postgis-raster/</span></a></span><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>, transforming the raster data to geometry data through DB manager using this command:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>select rid,rast::geometry from deforested_rasters<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><o:p> </o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;vertical-align:baseline'><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>but when visualized in QGIS, only returns a rectangular area without the original characteristics.<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;vertical-align:baseline;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;background-color:rgba(248, 248, 248, 0.6);word-spacing:0px'><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>Any ideas of how can i confirm that the<span class=apple-converted-space> “</span>raster2pgsql” command loads correctly the raster files? Or a different way to load these data into PostGIS?<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;vertical-align:baseline;orphans: auto;widows: 1;-webkit-text-stroke-width: 0px;background-color:rgba(248, 248, 248, 0.6);word-spacing:0px'><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>The raster files are available in:</span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><a href="https://www.dropbox.com/sh/nu8nl6cigv8viz1/AADTrr_w8SCstDHOu6AiGeJta?dl=0"><span lang=EN-US style='color:#358DAA;border:none windowtext 1.0pt;padding:0cm'>https://www.dropbox.com/sh/nu8nl6cigv8viz1/AADTrr_w8SCstDHOu6AiGeJta?dl=0</span></a></span><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:#333333'>Roberto<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>