I've got a raster loaded into PostGIS that contains grib forecast data which I loaded using
raster2pgsql using SRID 4326. To keep things simple I am not tiling the raster so I only have one row in my table. After the import, the resulting table contains two columns:
rid (integer) and
The source grib contain data for two points of time, and covers 9 different altitudes. I'm storing two data points for each time and altitude so I've got a total of 36 bands.
How can I query this raster to get a rowset with useful column names containing all available numeric values available for a path over the ground (geometry linestring) over time?
Here's CREATE TABLE for the table that results from running
CREATE TABLE public.cat ( rid integer NOT NULL DEFAULT nextval('cat_rid_seq'::regclass), rast raster, CONSTRAINT cat_pkey PRIMARY KEY (rid) );
And I can see I have 36 bands when I run this SQL:
SELECT ST_NumBands(rast) As num_bands FROM public.cat;