[postgis-tickets] [PostGIS] #3770: ST_ConvexHullAgg

PostGIS trac at osgeo.org
Wed Jun 7 14:53:41 PDT 2017


#3770: ST_ConvexHullAgg
--------------------------+---------------------------
  Reporter:  robe         |      Owner:  pramsey
      Type:  enhancement  |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS 2.4.0
 Component:  postgis      |    Version:  trunk
Resolution:               |   Keywords:
--------------------------+---------------------------
Description changed by robe:

Old description:

> 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(worker1,worker2,worker3))
>
> Let me know if I'm missing anything here.

New description:

 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.

--

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3770#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list