<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>I don't understand, <br></div>ST_Union is an agregate (or can be , there are several prototype for this function).<br></div><div>Are you talking about the Layer Union Layer use case?<br>
<br></div><div><br></div>Most of the time if you want to use a function as an aggregate you can simply do <br></div>ST_Function (ST_Collect()).<br><br></div>Adding aggregates is really less a priority than adding support for <br>
</div>ARRAY[geom1,geom2,geom3...] for the relevant functions.<br><br></div>The essential difference that is often blocking is that aggregates can't be used in a lot of places<br></div>(FROM, WHERE, in ordering, in windows ...), and you can't stake theim (aggregate(aggregate()) is forbiden).<br>
</div><br></div>So often going the array way is the only short solution(you have always the possibility ot use lot's of CTE but with big data this has a cost).<br><br></div>Cheers,<br>Rémi-C<br><div><div><div><div><div>
<div><div><div><div><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-09-01 10:37 GMT+02:00 Nicklas Avén <span dir="ltr"><<a href="mailto:nicklas.aven@jordogskog.no" target="_blank">nicklas.aven@jordogskog.no</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>In general I think we could do a lot of cool things with aggregates.
<div>I have had a thought in my head for a very long time that I haven't had time to investigate.</div>
<div><br>
</div>
<div>Quite often people is asking for a function like union in the esri world.</div>
<div><a href="http://resources.arcgis.com/en/help/main/10.1/index.html#//000800000010000000" target="_blank">http://resources.arcgis.com/en/help/main/10.1/index.html#//000800000010000000</a></div>
<div><br>
</div>
<div>In PostGIS we have a problem to do calculations that involves more than 2 geoemtries.</div>
<div>But as an aggregate function it vould be possible to do.</div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>/Nicklas</div>
</font></span><div><div class=""><br>
2014-09-01 Paul Ramsey wrote:<br>
<br>
Only reason is nobody ever asked for it, it's hard to figure great use<br>
>cases for it.<br>
><br>
>P<br>
><br></div><div class="">
>On Sun, Aug 31, 2014 at 6:16 PM, Paragon Corporation
<u></u> wrote:<br>
>> I wasn't sure if we just thought there wasn't much utility in it or if there<br>
>> was a technical obstacle.<br>
>><br>
>> I would think that would be easier to build than the other aggregates since<br>
>> as you add more geometries it shrinks and the current aggregate state is<br>
>> always the result of the previous state plus new geometry (so no need for an<br>
>> accumulation function or a final state function) and if you ever end up with<br>
>> a geometry collection, you short-circuit out.<br>
>><br>
>> Thanks,<br>
>> Regina<br>
>><br>
>><br>
>> _______________________________________________<br>
>> postgis-devel mailing list<br>
>> <a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br>
>_______________________________________________<br>
>postgis-devel mailing list<br>
><a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br>
><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br>
><br>
>
<u></u></div></div>
</div>
<br>_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br></blockquote></div><br></div>