0
votes

I have a postgis 2.2 table with 20 columns of type geometry(Point,4326)

I'd like to generate a polygon which covers the outer boundary of the points - it seems like ST_ConcaveHull is a good option, but I can't see how to do it without first converting my points back to text (which seems to be missing the point).

Is st_concavehull the right option, and how do I go about constructing the query?

Thanks!

1
Have now moved this question to the GIS forum: gis.stackexchange.com/questions/218849/… - user1051849

1 Answers

2
votes

You first need to collect your points, then pass this collection to ST_ConcaveHull:

ST_ConcaveHull(ST_Collect(geom), 1)

Per the ST_ConcaveHull documentation:

Although it is not an aggregate - you can use it in conjunction with ST_Collect or ST_Union to get the concave hull of a set of points/linestring/polygons ST_ConcaveHull(ST_Collect(somepointfield), 0.80).