How to convert points data to polygon,
so as to form polygon from exterior point as shown above
Asked
Active
Viewed 5,248 times
8
1 Answers
6
I would create a geometry collection from the points using st_collect():
http://postgis.net/docs/ST_Collect.html
Then I would create convex hull from the point collection: http://postgis.net/docs/ST_ConcaveHull.html
If you have a table of point geometries called testpoints where geometry column name was the_geom, this should create the polygon that you are looking for:
SELECT st_astext(st_concavehull(st_collect(the_geom),0.99))
FROM myschema.testpoints;
i use concavehull with 0.5 %
– user28344 Mar 24 '14 at 07:53