[postgis-users] Point to Polygon

Paragon Corporation lr at pcorp.us
Mon Mar 9 02:46:25 PDT 2009


Nicholas,
 
I think the easiest way is ST_MakeBox2D in combo with ST_SETSRID
 
If you are dealing with an unknown SRID use -1.
 
http://postgis.refractions.net/documentation/manual-svn/ST_MakeBox2D.html
 
 
ST_MakeBox2D only takes 2 points and returns a Box (not a polygon)
 
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).
 
Then calling ST_SetSRID will force the box into a polygon. 
 
Hope that helps,
Regina


  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Nicholas
I
Sent: Monday, March 09, 2009 2:31 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Point to Polygon


Hi, 

 Does any one know how to convert points to polygon.

 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.

Thank You
-Nicholas I

 

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


More information about the postgis-users mailing list