I just uploaded the raster using following code,
raster2pgsql -s 4326 -I -C -M raster.tif -F -t 100x100 public.raster_table | psql -U postgres -p 5432 -h localhost -d raster
It takes around 15 min to upload to database. After complete the process, I checked the table using
SELECT * FROM public.raster_table;. It has lots of rows (around 4000) with serial rid. I want to view the each pixel value using
ST_value. I already checked the documentation. In documentation, It provides following method to show all the pixel value.
SELECT x, y, ST_Value(rast, 1, x, y) As raster_val, FROM raster_table CROSS JOIN generate_series(1, 1000) As x CROSS JOIN generate_series(1, 1000) As y WHERE rid = 2 AND x <= ST_Width(rast) AND y <= ST_Height(rast);
But I am confused with
WHERE condition. In example it only use
rid=2. But I have lots of
rid. Is this condition really checks the all the pixel value?