[Qgis-user] PostGIS raster layer filtered by attribute

Thayer Young thayeray at yahoo.com
Thu Nov 3 06:57:40 PDT 2022


Hi Dirk,
I have looked into this and found no easy solution. As you have noticed there is no "Provider Feature Filter" in the Source tab of the layer properties for a raster layer. The next obvious path would be to write a SELECT statement in an SQL Window in the Database Manager and "Load as New Layer", but this is only set up for geometry columns, not raster. Next is to create a view or a materialized view with the associated indexes in the database and try adding that to QGIS using the four methods for adding layers. All of these result in the same PostGIS errors, that a primary key can not be found for the raster table, that the raster layer is invalid and that the "Data type size for band 1 could not be found: num bands is: 0 and the type size map for bands contains: 0 item(s)".  

I have searched the QGIS issues page on Github and not found anything beyond the basic functionality of adding PostGIS rasters. I believe that if you are interested in this functionality you should file a feature request on the qgis/QGIS issues page on Github.
This is what I found, note that all of the issues are closed: 
https://github.com/qgis/QGIS/issues?q=is%3Aissue+postgresraster+
-Thayer


 > Date: Wed, 2 Nov 2022 12:08:08 +0000
> From: <Dirk.Pispers at STADT-KOELN.DE>
> To: <qgis-user at lists.osgeo.org>
> Subject: [Qgis-user] PostGIS raster layer filtered by attribute
> Message-ID: <8766215b88b84d3ba770e6c0a7979d93 at STADT-KOELN.DE>
>Content-Type: text/plain; charset="us-ascii"
> 
>Hi list,
> 
> I import TIFF-files into a PostgreSQL/PostGIS table with FME. In addition to the raster column my table has some more columns.
> Is it possible to filter the raster layer based on my table by these additional columns?
> It seems that QGIS (up to 3.28) doesn't handle addional columns in raster layers, but maybe someone knows a trick to do so.
> Thanks and regards
>
> Dirk
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221103/e549968b/attachment.htm>


More information about the Qgis-user mailing list