[postgis-users] Import Raster with 3 bands to PostgreSQL

José Pedro Santos zpsantos1 at hotmail.com
Tue Dec 11 00:41:07 PST 2012

Hi Mauricio, 

I have one raster with 3 bands. I can see perfectly the layer in QGIS. When I import to PostgreSQL with the raster2pgsql command works fine but when I try to visualize the layer both in browser as WMS service or in QGIS I don't have any information is like when I import to PostgreSQL he merge the values in one band (despite the QGIS said that the layer have 3 bands and the GDAL info also says the same). Basically I would like to know if there’s a problem when import 3 bands raster files to PostgreSQL with the raster2pgsql command. 

Many thanks,
José Santos  

> Date: Mon, 10 Dec 2012 16:25:19 -0200
> From: mauricio.dev at gmail.com
> To: Pierre.Racine at sbf.ulaval.ca
> CC: postgis-users at lists.osgeo.org
> Subject: Re: [postgis-users] Import Raster with 3 bands to PostgreSQL
> Sorry but I didn't understand what you're trying to do. Could you 
> elaborate more?
> Were the 3 bands stored in a single file when you used raster2pgsql? If 
> that's the case, you should be able to see your data in qgis.
> If not, the 3 separate files had nothing to tell that they were separate 
> bands of the same imagery and were probably merged as a mosaic in 
> raster2pgsql. I've never tried that with overlapping data but certainly 
> qgis isn't ready to read special scenarios like this one.
> Mauricio C. M. de Paulo
> Cartography Engineer
> On 12/10/2012 02:37 PM, Pierre Racine wrote:
> > Which software? The software has to interpret himself the three bands as RGB. I don't think QGIS does that...
> >
> > There is nothing in PostGIS stating that a three bands raster is a TIFF or JPEG file. PostGIS store rasters, not images.
> >
> > Pierre
> >
> >> -----Original Message-----
> >> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> >> bounces at lists.osgeo.org] On Behalf Of José Pedro Santos
> >> Sent: Monday, December 10, 2012 11:26 AM
> >> To: postgis-users at lists.osgeo.org
> >> Subject: [postgis-users] Import Raster with 3 bands to PostgreSQL
> >>
> >> Dear all,
> >>
> >> I import with sucess a 3 band image to PostgreSQL 9.1 with the raster2pgsql in
> >> Ubuntu 12.04LTS. But when I try to visualize in another software I can't see the
> >> image and it looks like the values from the other bands glue only in the first
> >> band. Do you know if there's any problem with the import option of rasters with
> >> 3 bands to PostgreSQL?
> >> My Postgis version is 2.0.1.
> >>
> >> Best Regards and thanks,
> >> Jose Santos
> _______________________________________________
> postgis-users mailing list
> 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/20121211/b1aef9ec/attachment.html>

More information about the postgis-users mailing list