[postgis-users] Aggregate other columns along with st_clusterintersecting

Martin Davis mtnclimb at gmail.com
Sat Apr 20 07:53:15 PDT 2019


Currently ST_ClusterIntersecting is an aggregate function, not a window
function.  So unlike the other window functions it's not easy to do what
you want.  It will likely get rewritten as a window function soon,
hopefully.

In the meantime, you might be able to achieve what you want by using
ST_Dump and then joining back to the source table using ST_Equals.  This
won't be vey performant, of course.


On Tue, Apr 16, 2019 at 9:57 AM Eugene Podshivalov <yaugenka at gmail.com>
wrote:

> Hi all,
> Is it possible to aggregate other columns when ST_ClusterIntersecting
> function is used? Particularly I would like to get arrays of IDs
> corresponding to the geometries in each aggregated geometry collection.
>
> Link to the function definition page
> http://postgis.net/docs/ST_ClusterIntersecting.html
>
> Thanks,
> Eugene
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190420/77d2459c/attachment.html>


More information about the postgis-users mailing list