<html>
<head>
<title></title>
<meta content="MSHTML 6.00.6000.16850" name="GENERATOR"></meta>
</head>
<body>
<div align="left">Try this</div>
<div align="left">haven't tried it myself</div>
<div align="left"> </div>
<div>SELECT ST_MakePoly(ST_LineFromMultiPoint(ST_collect(coord1, coord2, coord3, coord4, coord5, coord1 ))) from table<br />
</div>
<div>greetings</div>
<div>Nicklas<br />
</div>
<div align="left"> </div>
<div align="left">ST_LineFromMultiPoint<br />
<br />
2009-06-23 Caspa wrote:<br />
<br />
Hi, thanks for that,<br />
>those are colunm in the table : <br />
><br />
> coord1 | coord2 | coord3 | coord4 | pol <br />
> ----------------------------------------------------+--------------------<br />
> geom_data | geom_data | geom_data | geom_data | I WANT THIS<br />
><br />
>I tried with this but didnt work;<br />
><br />
>SELECT ST_MakePoly(ST_MakeLine(coord1, coord2, coord3, coord4, coord5, coord1 ) from table<br />
><br />
>the problem is that I can't make i line from more than two points ( i'm using postgis v 1.3.5 and geometry <b>ST_MakeLine</b>(geometry[] point_array); doesn't work)<br />
> I'm trying to figure out how to use <br />
><br />
>geometry <b>ST_MakeLine</b>(geometry set pointfield);<br />
><br />
>but how do I build a geometry set pointfield???<br />
>sorry...really beginner!!<br />
><br />
><br />
><br />
><br />
><br />
><br />
>></div>
<div>2009/6/22 Paragon Corporation <<a>lr@pcorp.us</a>><br />
>Andrea,<br />
> Are those individual records or columns in the table?<br />
><br />
> Take a look at ST_MakeLine, ST_MakePolygon, ST_BuildArea<br />
><br />
><a href="http://postgis.refractions.net/documentation/manual-svn/ST_MakeLine.html" target="_blank">postgis.refractions.net/documentation/manual-svn/ST_MakeLine.html</a><br />
><br />
><a href="http://postgis.refractions.net/documentation/manual-svn/ST_BuildArea.html" target="_blank">postgis.refractions.net/documentation/manual-svn/ST_BuildArea.html</a><br />
><br />
><a href="http://postgis.refractions.net/documentation/manual-svn/ST_MakePolygon.html" target="_blank">postgis.refractions.net/documentation/manual-svn/ST_MakePolygon.html</a><br />
><br />
><br />
> You build a line from points with ST_MakeLine and then do a ST_BuildArea or<br />
> ST_MakePolygon depending on your desired effect.<br />
><br />
> Leo<br />
>></div>
<div>>
<div> </div>>
<div><br />
><br />
><br />
> -----Original Message-----<br />
> From: <a>postgis-users-bounces@postgis.refractions.net</a><br />
> [mailto:<a>postgis-users-bounces@postgis.refractions.net</a>] On Behalf Of Caspa<br />
> Sent: Monday, June 22, 2009 10:15 AM<br />
> To: <a>postgis-users@postgis.refractions.net</a><br />
> Subject: [postgis-users] build a polygon from points<br />
><br />
> Hi everybody,<br />
> I'm new to postgis...<br />
> how can i build a polygon starting from points and not from x,y coord?<br />
><br />
> i have a table built like this:<br />
><br />
> point1 | point2 | point3 | point4 | polygon<br />
><br />
> guess i have to use MakeLine and MakePolygon but i can't fugure out why...<br />
> thanks in advance<br />
><br />
> Andrea<br />
></div></div>
<div>_______________________________________________<br />
> postgis-users mailing list<br />
><a>postgis-users@postgis.refractions.net</a><br />
><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">postgis.refractions.net/mailman/listinfo/postgis-users</a><br />
><br />
><br />
> _______________________________________________<br />
> postgis-users mailing list<br />
><a>postgis-users@postgis.refractions.net</a><br />
><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">postgis.refractions.net/mailman/listinfo/postgis-users</a><br />
></div><br />
>
</body>
</html>