]> granicus.if.org Git - postgis/commitdiff
Another example for ST_DumpPoints which is the most common use case
authorRegina Obe <lr@pcorp.us>
Sun, 5 Aug 2012 23:04:38 +0000 (23:04 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 5 Aug 2012 23:04:38 +0000 (23:04 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10165 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_processing.xml

index 167e59364e2bc58103cc52d7117d6fd93527ad02..cb8d802253587e4eb42e26dc0c3c304c4ab31441 100644 (file)
@@ -1224,9 +1224,26 @@ SELECT (g.gdump).path, ST_AsEWKT((g.gdump).geom) as wkt
                                <para>&Z_support;</para>
                </refsection>
 
+               <refsection><title>Classic Explode a Table of LineStrings into nodes</title>
+                       <programlisting>SELECT edge_id, (dp).path[1] As index, ST_AsText((dp).geom) As wktnode
+FROM (SELECT 1 As edge_id
+       , ST_DumpPoints(ST_GeomFromText('LINESTRING(1 2, 3 4, 10 10)')) AS dp
+     UNION ALL
+     SELECT 2 As edge_id
+       , ST_DumpPoints(ST_GeomFromText('LINESTRING(3 5, 5 6, 9 10)')) AS dp
+   ) As foo;
+ edge_id | index |    wktnode
+---------+-------+--------------
+       1 |     1 | POINT(1 2)
+       1 |     2 | POINT(3 4)
+       1 |     3 | POINT(10 10)
+       2 |     1 | POINT(3 5)
+       2 |     2 | POINT(5 6)
+       2 |     3 | POINT(9 10)</programlisting>
+               </refsection>
                <refsection>
                        <title>Standard Geometry Examples</title>
-
+                       
                        <informalfigure>
                                <mediaobject>
                                        <imageobject>