ST ConvexHull

From gnewarchaeology wiki
Jump to: navigation, search
PostGIS > ST ConvexHull



ST_ConvexHull — The convex hull of a geometry represents the minimum convex geometry that encloses all geometries within the set.

Example from Pirro Nord:

# UPDATE layer_tmp AS foo SET geom_xhull = bar.geom
  FROM (
  SELECT p.layer, ST_ConvexHull(ST_Collect(p.geom)) AS geom FROM layer_point AS p
  GROUP BY p.layer
  ) AS bar
  WHERE foo.layer = bar.layer;