[postgis-devel] How do we know the number of raster bands of a WKTRaster object?

Mateusz Loskot Mateusz.Loskot at cadcorp.com
Mon Jul 13 08:40:57 PDT 2009


Jorge Arévalo wrote:
> 
> I have a doubt: I have a raster loaded in PostgreSQL with
> gdal2wktraster, and I'm not sure of the best way to know the number of
> raster bands the raster has. The fields "pixel_types" and
> "nodata_values" from raster_columns table are arrays with one element
> per raster band, so, counting the number of elements of one of these
> arrays, I can get the number of raster bands. But it doesn't seem to
> be a very "elegant" way. Do we have another way to do this?

My replies posted to gdal-dev:

http://lists.osgeo.org/pipermail/gdal-dev/2009-July/021232.html
http://lists.osgeo.org/pipermail/gdal-dev/2009-July/021238.html


--
Mateusz Loskot
Senior Programmer, Cadcorp
http://www.cadcorp.com






More information about the postgis-devel mailing list