[postgis-users] point to list

Randall, Eric ERandall at eriecountygov.org
Sun Oct 11 06:16:53 PDT 2009


Try,
 
select generate_series(1, ST_npoints(geom)-1) as point_id , ST_pointn(ST_exteriorring(geom),generate_series(1, ST_npoints(geom)-1)) as geom
from polygontable
 
 
 
based on this post http://www.nabble.com/Re:-Splitting-linestring-into-line-segments-td16063883.html
 
 
-Eric

 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of eehab hamzeh
Sent: Sunday, October 11, 2009 8:13 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] point to list


Hello 
 
i try to have the points that make one polygon in one table as follow.
 
i have the following polygon
 
polygon (0 0, 0 1, 1 1, 1 0)
 
i need it to be in a table where the results looks like 
 
id :  the_geom
1  :  point(0 0)
2  :  point(0,1)
3  :  point(1 1)
4  :  point(1,0)
 
i try to use st_dump(the geom) from polygon
 
it does not work 
it is important to me to assign id for each point
 
 
thanks 
 


  _____  

Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail  <http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010> you. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091011/c9f7e3fd/attachment.html>


More information about the postgis-users mailing list