[postgis-users] Import Raster with 3 bands to PostgreSQL
Pierre Racine
Pierre.Racine at sbf.ulaval.ca
Tue Dec 11 11:34:13 PST 2012
> What is the difference between a image and a raster?? both have pixel values
> but image have from 0 to 255 so are equal and raster2pgsql work fine with that.
> I guess that only import the first band values and not the others so there's the
> problem I think...that's why I ask.
The difference is that an image contains information about how to interpret the different bands (it can be just the extension of the file e.g .JPG or .PNG or a tag in the file e.g. TIFF). Rasters are just data without interpretative information. PostGIS rasters do not contain any interpretative information. It would be the task of the QGIS plugin to systematically or optionally interpret three bands raster as a RGB image, 4 bands as RGBA, or any other interpretation possible.
You can check the number of band loaded in PostGIS with the ST_BandMetadata(rast) or the ST_NumBands(rast) function.
Pierre
More information about the postgis-users
mailing list