From fd7f7efc8b79c2f31496581d9bcf95965f23ed7b Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 13 Mar 2015 12:09:51 +0000 Subject: [PATCH] Clarify the role of ST_DumpValues array indexes git-svn-id: http://svn.osgeo.org/postgis/trunk@13331 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference_raster.xml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index 8351c8d3a..cd2095cd4 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -5564,7 +5564,7 @@ ORDER BY t1.rid, t2.gid, t3.gid; raster rast - integer[] nband + integer[] nband=NULL boolean exclude_nodata_value=true @@ -5589,7 +5589,7 @@ ORDER BY t1.rid, t2.gid, t3.gid; Description - Get the values of the specified band as a 2-dimension array. If nband is NULL or not provided, all raster bands are processed. + Get the values of the specified band as a 2-dimension array (first index is row, second is column). If nband is NULL or not provided, all raster bands are processed. Availability: 2.1.0 @@ -5628,6 +5628,19 @@ FROM foo; 1 | {{1,1,1},{1,1,1},{1,1,1}} (2 rows) + +WITH foo AS ( + SELECT ST_SetValue(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, 0, 1, -1, 0, 0, 0), 1, '8BUI', 1, 0), 1, 2, 5) AS rast +) +SELECT + (ST_DumpValues(rast, 1))[2][1] +FROM foo; + + st_dumpvalues +--------------- + 5 +(1 row) + -- 2.50.1