[postgis-users] How to transform point data to 2-dims array for use in ST_SetValues

Gis Mage gismage at gmail.com
Tue Apr 2 13:25:51 PDT 2013

Hi, list!

I have a table of points that form a grid of equally distributed 1000x1000
points (1 mln records in a table).
The fields are lon,lat,vale,valv,geom
My goal is to create a 1000x1000 px raster with two bands, representing
vale and valv values from points of initial table.
I guess the best way to do it is to sort the initial table by lon, lat and
form a 2 dimensional array for each of the band, so I can then put it in
ST_SetValues as an argument. Then it'll fill the entire band with values at
once instead of using ST_SetValue to burn each value into raster pixel by
Can someone give an example SQL expression to create a 2 dimensional array
from table of values?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130403/1c94bce3/attachment.html>

More information about the postgis-users mailing list