[postgis-users] Aggregate other columns along with st_clusterintersecting

Daniel Baston dbaston at gmail.com
Sat Apr 20 08:36:40 PDT 2019


You may also be able to achieve what you want by using the ST_ClusterDBSCAN
window function with arguments "eps=0" and "minpoints=1".

On Sat, Apr 20, 2019 at 10:53 AM Martin Davis <mtnclimb at gmail.com> wrote:

> 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
>
> _______________________________________________
> 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/a0aac611/attachment.html>


More information about the postgis-users mailing list