[postgis-devel] ST_Union specification questions

Paragon Corporation lr at pcorp.us
Mon Nov 21 15:26:43 PST 2011


Bryce,
 
Actually PostgreSQL 9.0+ does support ordered aggregates
 
ST_MakeLine is a fine example that works great with ordered aggregate
syntax. e.g. ST_MakeLine(geom ORDER BY time)
so FIRST and LAST I envision people would probably always want those based
on some predicatable ordering. 
 
I can envision cases in raster where you would want things processed in a
certain order like you want all your following rasters burned on the first
based on a certain priority of layering.
 
Just my 2c.
 
Thanks,
Regina
 
 
 
 
 
 


  _____  

From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Bryce L
Nordgren
Sent: Monday, November 21, 2011 5:07 PM
To: PostGIS Development Discussion
Subject: [postgis-devel] ST_Union specification questions


So....

How are the p_, t_ and f_ expressions related? It seems like these
accumulate values in three different bands? If so, how was the number "three
bands" determined? If you don't specify one set of expressions, does the
corresponding band disappear out of the result? Or am I reading it
completely wrong: Does ST_Union always return a single band, and the "state"
expression is some sort of "scratch" band which is used to accumulate
information, but which is not actually returned?

Also, aggregate functions really should not produce results which depend on
the order in which the individual records are encountered. Allowing this
functionality (see specifications: FIRST and LAST set of expressions) is
inviting trouble of a spurious and random nature, particularly when results
from Windows are compared with results from linux. The answer should always
be the same, just like the geometry version of ST_Union always returns the
same value. The solution may be to limit the functions which are allowed to
appear in the expression to other aggregates...

Bryce


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20111121/f0d0d230/attachment.html>


More information about the postgis-devel mailing list