<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.6001.18203" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2>Martin,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2>You could try closing the polygons with ST_AddPoint and
then use ST_Polygonize.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2><A
href="http://postgis.refractions.net/documentation/manual-svn/ST_AddPoint.html">http://postgis.refractions.net/documentation/manual-svn/ST_AddPoint.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2><A
href="http://postgis.refractions.net/documentation/manual-svn/ST_Polygonize.html">http://postgis.refractions.net/documentation/manual-svn/ST_Polygonize.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=663385600-07032009><FONT face=Arial
color=#0000ff size=2>Leo</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>Martin Fafard<BR><B>Sent:</B> Friday, March 06, 2009 5:03 PM<BR><B>To:</B>
Stephen Woodbridge<BR><B>Cc:</B> PostGIS Users Discussion<BR><B>Subject:</B> Re:
[postgis-users] Linestrings to polygons<BR></FONT><BR></DIV>
<DIV></DIV>Stephen<BR><BR>Builarea only polygonize linestrings that are closed.
And I don't want one polygon but all possible polygons (pdf join for
demo).<BR><BR>Martin F<BR><BR>Stephen Woodbridge a écrit :
<BLOCKQUOTE cite=mid:49B19AB3.1040503@swoodbridge.com type="cite">Martin
Fafard wrote: <BR>
<BLOCKQUOTE type="cite">Hi <BR><BR>How to convert linestring to polygons?
Linetrings are not "closed" but snap each other. <BR></BLOCKQUOTE><BR>Look at
<BR><BR>select ST_BuildArea(the_geom) from mytable where <select your
linestrings>; <BR><BR>you might need to collect(the_geom) if it is
expecting a single object. <BR><BR>-Steve <BR><PRE wrap=""><HR width="90%" SIZE=4>
No virus found in this incoming message.
Checked by AVG - <A class=moz-txt-link-abbreviated href="http://www.avg.com">www.avg.com</A>
Version: 8.0.237 / Virus Database: 270.11.8/1987 - Release Date: 03/06/09 07:20:00
</PRE></BLOCKQUOTE></BODY></HTML>