<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>Nicholas,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>I think the easiest way is ST_MakeBox2D in combo with 
ST_SETSRID</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>If you are dealing with an unknown SRID use 
-1.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2><A 
href="http://postgis.refractions.net/documentation/manual-svn/ST_MakeBox2D.html">http://postgis.refractions.net/documentation/manual-svn/ST_MakeBox2D.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>ST_MakeBox2D only takes 2 points and returns a Box (not a 
polygon)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>but for an extent of a map (which is I assume what you are 
trying to make into a polygon, you don't need all 4 points).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>Then calling ST_SetSRID will force the box into a 
polygon. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>Hope that helps,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=306314009-09032009><FONT face=Arial 
color=#0000ff size=2>Regina</FONT></SPAN></DIV><FONT face=Arial color=#0000ff 
size=2></FONT><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>Nicholas I<BR><B>Sent:</B> Monday, March 09, 2009 2:31 AM<BR><B>To:</B> 
postgis-users@postgis.refractions.net<BR><B>Subject:</B> [postgis-users] Point 
to Polygon<BR></FONT><BR></DIV>
<DIV></DIV>Hi, <BR><BR> Does any one know how to convert points to 
polygon.<BR><BR> I have four edges of the map with the values in lat and 
lon as a point layer, can anybody suggest me on converting these two 
polygons.<BR><BR>Thank You<BR>-Nicholas I<BR><BR> <BR></BODY></HTML>