> Hi, I need to develop a tool that is able to connect with PostGIS and extract
> the cell values from a raster stored in it creating a matrix with them. It
> could be done with queries launched from that tool, using ST_Value(), for
> each cell, but the number of queries would be huge.

You would better be creating a polygon encompassing the pixels you want and 
ST_Clip the raster to this polygon and then get all the values with 
(ST_PixelAsPolygons()).val,  (ST_PixelAsPolygons()).x, (ST_PixelAsPolygons()).y

But could you explain what you intent to do with the values of the matrix? 
Maybe there is a simpler way to do it in SQL...

Maybe just adding a parameter to ST_Neighborhood stating that the neighbourhood 
should be a square instead of a circle would also do what you want. Bborie?

Pierre
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to