[postgis-users] Sorry for simple question!

Darrel Maddy darrel.maddy at newcastle.ac.uk
Fri Aug 1 06:18:38 PDT 2014


Thanks David, I will explore using the bands to store multiple rasters later. For now I am just trying to see how I can visualise one raster (stored in one row of a multi-raster i.e. multiple row, table).  I assume I will have the same problem with a multiband raster i.e. selecting only one band to visualise in QGIS.  As I need to perform calculations using either individual rows or bands, I need to resolve this.

I am convinced this is simple but the brain cells are not working well today.

Thanks

Darrel






From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of David Haynes
Sent: 01 August 2014 13:51
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Sorry for simple question!

You can place rasters into a single raster using ST_BAND. If you are familiar with rasters this will make a multispectral raster. I don't believe there is a limit to the bands as I have added over 50. To make the multispectral raster your other rasters (matrices) will need to be the same cell size and alignment.

You might try http://www.gdal.org/gdal_merge.html (using the -separate)

This will create a 2 banded raster in postgis
ST_AddBand(ST_MakeEmptyraster(layers.modis_rast),ARRAY[layers.modis_rast, layers.stack_rast]) as rast

On Fri, Aug 1, 2014 at 6:42 AM, Darrel Maddy <darrel.maddy at newcastle.ac.uk<mailto:darrel.maddy at newcastle.ac.uk>> wrote:
Dear all,

I am just reacquainting myself with postgres and postgis and trying to decide how best to store the output from my model (large matrices stored in gtiff format).  I really want to store multiple rasters in one table but when I try to visualise these in QGIS (via an sql extract in dbmanager using import to new layer) nothing happens. I can add one raster per table to the canvas but I do not want thousands of tables.   Will the dbmanager sql add layer work with rast as a geometry?

I suspect this is simple, but it eludes me at present.

Thanks in anticipation of your help.

Darrel

_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org<mailto:postgis-users at lists.osgeo.org>
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140801/77f7391e/attachment.html>


More information about the postgis-users mailing list