I have a question about loading raster layers into QGIS from PostGIS, it's a an extension from the question asked [here] : Loading PostGIS raster layer into QGIS
'DB Manager', 'add to canvas' works fine, when my PostGIS table contains only 1 raster.

However, I have set up a table where each row has it's own raster, and I am trying to load just the raster that results from a query. So for example, I run the query:

SELECT * FROM raster_table WHERE rid = 8;

This returns the row I am after - which contains a value in the rid column and a value in the raster column relating to the raster, however when I try to load the raster by checking "Load as new layer" and completing the dialog box, I can only get a table to load containing just the rid. I can't get a raster to load from the query.

Could anyone explain if it is possible to do it this way, or does a raster need to be saved in PostGIS individually?

  • This is basically the same questions as this one. My impression is that raster queries are not yet implemented. As a workaround I have run the query in PostGIS to create a temporary raster table with one row and then displayed this one. Maybe this can also be done with views. – geodata Apr 4 '18 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.