Opened 8 years ago

Last modified 5 years ago

#3770 new enhancement

ST_ConvexHullAgg

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: Cc:

Description (last modified by robe)

I've been thinking that we really need a ConvexHull agg.

Most of the cases where people use it they do stuff like

SELECT ST_ConvexHull(ST_Collect(geom)) 
....


or

SELECT ST_ConvexHull(ST_Union(geom)) 
..

Which when you think of it, seems inefficient to store all those bits of geometries just to squash them.

I'd have to do some tests, but I'm suspecting following how we do ST_Extent should be more efficient since any convexhull you compute for 2 geometries in a set is always going to be a subset or equal to what you compute for 3 geometries.

So we could also parallelize this since

the combine would be something like ST_ConvexHull(collect(ST_ConvexHull(worker1_geoms),ST_ConvexHull(worker2_geoms),ST_ConvexHull(worker3_geoms)))

Let me know if I'm missing anything here.

Change History (9)

comment:1 by robe, 8 years ago

Type: defectenhancement

comment:2 by robe, 8 years ago

Description: modified (diff)

comment:3 by robe, 7 years ago

Milestone: PostGIS 2.4.0PostGIS 2.5.0

comment:4 by robe, 6 years ago

Milestone: PostGIS 2.5.0PostGIS next

comment:5 by robe, 6 years ago

Milestone: PostGIS nextPostGIS 3.0.0

Milestone renamed

comment:7 by pramsey, 5 years ago

should probably put this aside until we have something smarter on the GEOS side to support incremental building of convex hulls.

comment:8 by mdavis, 5 years ago

There was a recent question about a Dynamic (Incremental) Convex Hull algorithm for JTS here.

Summary is that incremental convex hull algorithms exist, but it seems hard to find source code around.

comment:9 by pramsey, 5 years ago

Milestone: PostGIS 3.0.0PostGIS Fund Me

Punting until conditions warrant a re-look

Note: See TracTickets for help on using tickets.