<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 10.00.9200.17054"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2
face=Arial></FONT> </DIV>
<DIV>
<DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT><BR></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial> > </FONT></SPAN>What I target is not the unioning
between the layers but inside the same layer. The problem is the same -> to
do something with more than two geometries involved.</DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV>
<DIV><BR><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial> > </FONT></SPAN>Adding aggregates is really less a
priority than adding support for <BR>></DIV>
<DIV>ARRAY[geom1,geom2,geom3...] for the relevant functions.<BR>><SPAN
class=157412012-01092014><FONT color=#0000ff size=2
face=Arial> </FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>>
<FONT color=#000000 size=3 face="Times New Roman">Are you sure that the planner
and indexes will manage arrays better?</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>The
reason I was thinking an array of aggregates is not as useful as an
ST_Intersection aggregate is that as you intersect geometries you are using less
memory rather than more</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>with
array you'd have to accumulate them first.</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>It
really is a sequential thing.</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>That
is not to say the ARRAY version isn't useful, but if you have a bunch of
geometries and then have to array them to get an intersection, then it would be
slower.</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><SPAN class=157412012-01092014><FONT
color=#0000ff size=2 face=Arial>I could be wrong on that of course. Paul and
Nicklas can correct me on that since they are more familiar with the
innards.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><SPAN class=157412012-01092014><FONT
color=#0000ff size=2 face=Arial></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>I have
on occasion come into the situation where the things I want to get intersection
of are in separate rows rather than separate layers and it is a tad bit annoying
to work around it. Doesn't come up often though.</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><SPAN class=157412012-01092014><FONT
color=#0000ff size=2 face=Arial>Now with 9.4 coming with the FILTER syntax now
makes the across rows much easier if I actually had an ST_Intersection aggregate
that could take advantage of it.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><SPAN class=157412012-01092014><FONT
color=#0000ff size=2 face=Arial></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><SPAN class=157412012-01092014>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial> > </FONT></SPAN>Yes, I guess you are right that it
would be possible to write a function that does the job from a collection</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial> > </FONT></SPAN>But the function will have to do the
same thing. To calculate a result from 2 polygons, then use the resulting
polygon for calculation against the third polygon and so on. Just like an
aggregate function works.</DIV></SPAN></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>I
actually hadn't thought of our ST_UnaryUnion <A
href="http://postgis.net/docs/manual-2.1/ST_UnaryUnion.html">http://postgis.net/docs/manual-2.1/ST_UnaryUnion.html</A>
equivalent of ST_Intersection which is what I think Nicklas is
talking about here. That would be useful as well.</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>That
introduces another question though?</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>Would
an ST_Intersection aggregate double as an
ST_UnaryIntersection?</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>or we
just keep them separate.</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2 face=Arial>I
would say keep them separate so that we have a parallel with ST_UnaryUnion and
also you can use it NOT as an aggregate to satisfy the array like
need.</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial>Regina</FONT></SPAN></DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=157412012-01092014><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>