From: Regina Obe Date: Fri, 30 Apr 2010 16:17:18 +0000 (+0000) Subject: example for ST_DumpAsPolygons X-Git-Tag: 2.0.0alpha1~3017 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f98ee5ca53dffde05d1ca5e650cd59a3fcdfd86e;p=postgis example for ST_DumpAsPolygons git-svn-id: http://svn.osgeo.org/postgis/trunk@5591 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_wktraster.xml b/doc/reference_wktraster.xml index bf39d368e..7dd3bb66d 100644 --- a/doc/reference_wktraster.xml +++ b/doc/reference_wktraster.xml @@ -1860,14 +1860,31 @@ FROM (SELECT ST_SetRotation(rast,0.1,0.1) As rast reverse of a GROUP BY in that it creates new rows. For example it can be used to expand a single raster into multiple POLYGONS/MULTIPOLYGONS. - Availability: Requires GDAL 1.6 or higher. + Availability: Requires GDAL 1.6.1 or higher. Still under development and testing. Examples - - Forthcoming + SELECT val, ST_AsText(geom) As geomwkt +FROM ( +SELECT (ST_DumpAsPolygons(rast)).* +FROM dummy_rast +WHERE rid = 2 +) As foo +WHERE val BETWEEN 249 and 251 +ORDER BY val; + + val | geomwkt +-----+-------------------------------------------------------------------------- + 249 | POLYGON((3427927.95 5793243.95,3427927.95 5793243.85,3427928 5793243.85, + 3427928 5793243.95,3427927.95 5793243.95)) + 250 | POLYGON((3427927.75 5793243.9,3427927.75 5793243.85,3427927.8 5793243.85, + 3427927.8 5793243.9,3427927.75 5793243.9)) + 250 | POLYGON((3427927.8 5793243.8,3427927.8 5793243.75,3427927.85 5793243.75, + 3427927.85 5793243.8, 3427927.8 5793243.8)) + 251 | POLYGON((3427927.75 5793243.85,3427927.75 5793243.8,3427927.8 5793243.8, + 3427927.8 5793243.85,3427927.75 5793243.85))