Displaying 1 result from an estimated 1 matches for "st_setvalu".
Did you mean:
st_setvalues
2013 Oct 08
0
PostGIS 2.1 rasters available to Rails code: breadcrumbs
...easons. But even the fabulous RGeo
gem doesn''t know from rasters, or at least not yet AFAIK. So there''s no way
to get pixels out of the raster except one-by-one with an ST_Value query;
for a 297x582 array, a nonstarter.
Enter PostGIS 2.1 and its lovely lovely ST_DumpValues and ST_SetValues
functions. By using the connection''s select_value method, we can return an
arbitrary SQL result as a string, in this case a 2D array coded with the
PostgreSQL convention of { and } where Ruby uses [ and ].
Likewise, connection.update can take an SQL string, and we can wad a 2D
array...