I have a postgresql db using postgis 2.0 and a table of thousands of points, I would like create a polygon of the furthest points originating around a particular central location. I haven't got a clue how this would be done, any ideas anyone??
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Filter and aggregate the points, and return the convex hull of the points.
So to select the points in mytable
that are within a distance of 10 from id=123, and return the enclosing polygon:
SELECT ST_ConvexHull(ST_Collect(A.geom))
FROM mytable A, mytable B
WHERE B.id=123 AND ST_DWithin(A.geom, B.geom, 10)