<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    you just have to add the layer from db manager directly, it is
    working with raster too.<br>
    I already did few days ago with QGIS 2.2 with PostGIS Raster, it
    worked really well better than other previous versions of QGIS.<br>
    cheers,<br>
    Jose Carlos Martinez<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 07/03/2014 10:40, José Pedro Santos
      wrote:<br>
    </div>
    <blockquote cite="mid:DUB110-W1399D758BC697557698953AE08B0@phx.gbl"
      type="cite">
      <style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
      <div dir="ltr">Ciao Guido,<br>
        <br>
        DBManager is only for vector layers..In the version 1.8 existed
        a plugin for importing raster layers but wasn't update for this
        new version. <br>
        <br>
        Regards,<br>
        José Santos <br>
        <br>
        <div>
          <hr id="stopSpelling">From: <a class="moz-txt-link-abbreviated" href="mailto:guido.lemoine@jrc.ec.europa.eu">guido.lemoine@jrc.ec.europa.eu</a><br>
          To: <a class="moz-txt-link-abbreviated" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a><br>
          Date: Fri, 7 Mar 2014 07:51:33 +0100<br>
          Subject: [Qgis-user] PostGIS raster access in QGIS using
          DBManager (or wktraster)<br>
          <br>
          <style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:12.0pt;
font-family:"Times New Roman","serif";
}

.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}

.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}

.ExternalClass span.ecxEmailStyle17 {
font-family:"Calibri","sans-serif";
color:windowtext;
}

.ExternalClass .ecxMsoChpDefault {
font-family:"Calibri","sans-serif";
}

.ExternalClass div.ecxWordSection1 {
}

--></style>
          <div class="ecxWordSection1">
            <p class="ecxMsoNormal">Dear QGIS users,<br>
              <br>
            </p>
            <p class="ecxMsoNormal">[This was posted on QGIS developer
              as well, but maybe I should seek the solution here]</p>
            <p class="ecxMsoNormal"><br>
              I am using QGIS 2.2 .0 (Valmiera) and trying to load a
              raster query result via DBManager, using the following
              query:<br>
              <br>
              select 1 as rid, st_union(st_band(rast, '4,3,2') ) as rast<br>
              from o_8_lc81970232013202lgn00_all_rds_sub, municipalities<br>
              where municipalities.wkb_geometry && rast<br>
              and munname = 'Veendam' <br>
              <br>
              (in short: Band 4,3,2 of a raster2pgsql-loaded Landsat-8
              image (overview 8 version) for a "municipality" polygon
              (administrative commune boundary).<br>
              <br>
              Execute (F5) correctly returns a single row (and I can
              save the union result with ST_AsTIFF() to file in a
              script)<br>
              <br>
              When I try to "Load as a new layer" to visualise the
              result in QGIS, I get the following error message:<br>
              <br>
              Erroneous query: SELECT DISTINCT
              upper(geometrytype("rast")),st_srid("rast") FROM (select 1
              as rid, st_union(st_band(rast, '4,3,2') ) as rast<br>
              from o_8_lc81970232013202lgn00_all_rds_sub,
              gemeentegebieden<br>
              where gemeentegebieden.wkb_geometry && rast<br>
              and gemnaam = 'Veendam' <br>
              ) AS "subQuery_0" returned 7 [ERROR:  function
              geometrytype(raster) does not exist<br>
              LINE 1: SELECT DISTINCT
              upper(geometrytype("rast")),st_srid("rast") ...<br>
                                            ^<br>
              HINT:  No function matches the given name and argument
              types. You might need to add explicit type casts.<br>
              ]<br>
              <br>
              Apparently, my query get "wrapped"  in the SELECT DISTINCT
              outer query above (which obviously does not work).<br>
              <br>
              Is this a known issue, and, if so, can it be modified, for
              instance by providing explicitly geometrytype and srid
              (and if so, how?).<br>
              <br>
              I also checked out the wktraster plugin, but that does not
              work for 2.2. Is an upgrade expected soon [or should I try
              writing it myself].<br>
              <br>
              Thanks for all the wonderful stuff,<br>
              <br>
              Guido Lemoine</p>
            <p class="ecxMsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";"> </span></p>
            <p class="ecxMsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";"> </span></p>
          </div>
          <br>
          _______________________________________________
          Qgis-user mailing list
          <a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
          <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
    </blockquote>
    <br>
  </body>
</html>