May 2017
Beginner to intermediate
328 pages
7h 17m
English
Another possibility for creating polygons from points is to compute a convex or concave hull. A convex hull is a polygon containing all input points. It's often described as a rubber band.
PostGIS has an ST_ConvexHull function. It takes one argument - an input geometry. It's not an aggregate function, so in order to supply a set of points, the ST_Collect aggregate has to be used first.
The convex hull of all mineshafts is written as follows:
SELECT ST_ConvexHull( ST_Collect(wkb_geometry) ) FROM points WHERE man_made = 'mineshaft'

The convex hull is cheaply computed, but ...
Read now
Unlock full access