Pixel values of raster records to be inserted in the table as columns
问题 I have a table with following columns: (ID, row_num, col_num, pix_centroid, pix_val1). I have more than 1000 records. I am inserting my data using: insert into pixelbased (row_num, col_num, pix_centroid, pix_val) select (ST_PixelAsPolygons(rast, 1)).x as X, (ST_PixelAsPolygons(rast, 1)).y as Y, (ST_Centroid((ST_PixelAsPolygons(rast, 1)).geom)) as geom, (ST_PixelAsPolygons(rast, 1)).val as pix_val1 from mytable where rid=1` Now I am trying to insert all the other records as a column and _pix