From e3e867ffd97fb227bd5d7a00762be34035856707 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Sun, 5 Aug 2012 23:04:38 +0000 Subject: [PATCH] Another example for ST_DumpPoints which is the most common use case git-svn-id: http://svn.osgeo.org/postgis/trunk@10165 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference_processing.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/reference_processing.xml b/doc/reference_processing.xml index 167e59364..cb8d80225 100644 --- a/doc/reference_processing.xml +++ b/doc/reference_processing.xml @@ -1224,9 +1224,26 @@ SELECT (g.gdump).path, ST_AsEWKT((g.gdump).geom) as wkt &Z_support; + Classic Explode a Table of LineStrings into nodes + 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) + Standard Geometry Examples - + -- 2.40.0