<div dir="ltr">Hi Regina,<div><br></div><div>Yes, the information you provided is very helpful. Thanks a lot.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 23, 2017 at 9:56 PM, Regina Obe <span dir="ltr"><<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_-2784699445145380035WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Couple of updates here:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The srid issue with the raster2pgsql transforming instead of setting srid, I confirmed to be an unintentional feature (bug however you want to think of it).<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I've patched it up here:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://trac.osgeo.org/postgis/ticket/3738" target="_blank">https://trac.osgeo.org/<wbr>postgis/ticket/3738</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I think this issue wasn't discovered because using the –Y (which means copy mode) is much more efficient than without –Y (which uses INSERT statements) and when you use the –Y, the system doesn't try to transform, and does do the correct set srid because the transform logic relies on ST_Transform which can't be done in copy mode.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">So the work around for the broken versions is to use the –Y switch.  You should probably just always use the –Y switch when you don't need to transform, which you can't do very well with the broken version.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">raster2pgsql -C -t 500x500 -R -Y -s 26918 -F -I C:/gisdata/*.jp2 nj_aerials<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">When I do that transform is not attempted and the rasters stay out of database, but the SRID is set to what I specified.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">On a related note, I tested QGIS and ran into the same issue as Osahon that the out-db does not show.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">However if I build overviews and select the out-db it shows until I zoom into the image.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I think this happens because zooming in forces it to use the out-db table instead of the overviews. I guess the driver is trying to use the raw bytes instead of using the built in raster functions for display.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Not sure how hard of a fix that would be to fix the GDAL postgis raster driver as I suspect it's the GDAL driver at fault and not QGIS.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Hope this helps,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Regina<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></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:<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@<wbr>lists.osgeo.org</a>] <b>On Behalf Of </b>Osahon Oduware<br><b>Sent:</b> Wednesday, April 19, 2017 11:52 AM<br><b>To:</b> PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><wbr>><br><b>Subject:</b> Re: [postgis-users] QGIS Loads Black Screen For PostGIS Out-DbRaster Data<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p><div><div><p class="MsoNormal" style="margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">Hi Tumasgiu,<u></u><u></u></p></div><p class="MsoNormal" style="margin-left:.5in">Sorry, for not updating you. Yes, I followed up on your suggestion and Regina, Adrian, and some others assisted me in building PostGIS with a MrSID-enabled GDAL. My Out-DB rasters are in the MrSID format.<br><br>This raster file exist on the filesystem and when it is loaded directly into QGIS it displays the image (aerial photo). Also, when the same file is stored in PostGIS as a raster (IN-DB), it can be viewed in QGIS (using the DB Manager tool). However, when I reference the same file as an OUT-DB raster in PostGIS (in this case only the metadata of the raster and the filepath to the raster file is stored), an attempt to view it in QGIS (using the DB Manager tool) results in a black image being displayed instead of the aerial photo.<u></u><u></u></p><div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div></div><div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p><div><p class="MsoNormal" style="margin-left:.5in">On Wed, Apr 19, 2017 at 4:41 PM, Tumasgiu Rossini <<a href="mailto:rossini.t@gmail.com" target="_blank">rossini.t@gmail.com</a>> wrote:<u></u><u></u></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><div><p class="MsoNormal" style="margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">Hi,<u></u><u></u></p></div><p class="MsoNormal" style="margin-left:.5in">What is the format of your rasters ?<u></u><u></u></p></div><p class="MsoNormal" style="margin-left:.5in">With your precedents messages in mind, I guess that the format is Mr.SID,<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in">can you confirm that ?<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">(if so, then it means that you have managed your first postgis build, so congrats !)<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in">It's important to give as much as detail as possible if you want help.<br> <u></u><u></u></p></div></div><div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p><div><div><div><p class="MsoNormal" style="margin-left:.5in">2017-04-18 15:43 GMT+02:00 Osahon Oduware <<a href="mailto:osahon.gis@gmail.com" target="_blank">osahon.gis@gmail.com</a>>:<u></u><u></u></p></div></div><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><div><p class="MsoNormal" style="margin-left:.5in">Hi All,<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in">I have an out-db raster on PostGIS which I tried to load in QGIS (v 2.14.12-Essen) utilizing the DB Manager to establish a connection. I could view the raster table, but when I try to "Add to canvas" it displays a black screen instead of the raster image. <u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-left:.5in">I would be glad if someone could help me to resolve this.<u></u><u></u></p></div></div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div></div><p class="MsoNormal" style="margin-left:.5in">______________________________<wbr>_________________<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/<wbr>mailman/listinfo/postgis-users</a><u></u><u></u></p></blockquote></div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div><p class="MsoNormal" style="margin-left:.5in"><br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/postgis-users</a><u></u><u></u></p></blockquote></div><p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p></div></div></div></div></div><br>______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>