The three aggregate functions for temporal circular buffers are illustrated next.
Temporal count
tCount(tcbuffer) → {tintSeq,tintSeqSet}
WITH Temp(temp) AS ( SELECT tcbuffer '[Cbuffer(Point(1 1), 0.1)@2001-01-01, Cbuffer(Point(1 1), 0.3)@2001-01-03)' UNION SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-02, Cbuffer(Point(1 1), 0.4)@2001-01-04)' UNION SELECT tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-03, Cbuffer(Point(1 1), 0.5)@2001-01-05)' ) SELECT tCount(Temp) FROM Temp; -- {[1@2001-01-01, 2@2001-01-02, 1@2001-01-04, 1@2001-01-05)}
Window count
wCount(tcbuffer) → {tintSeq,tintSeqSet}
WITH Temp(temp) AS ( SELECT tcbuffer '[Cbuffer(Point(1 1), 0.1)@2001-01-01, Cbuffer(Point(1 1), 0.3)@2001-01-03)' UNION SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-02, Cbuffer(Point(1 1), 0.4)@2001-01-04)' UNION SELECT tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-03, Cbuffer(Point(1 1), 0.5)@2001-01-05)' ) SELECT wCount(Temp, '1 day') FROM Temp; /* {[1@2001-01-01, 2@2001-01-02, 3@2001-01-03, 2@2001-01-04, 1@2001-01-05, 1@2001-01-06)} */
TODO Temporal centroid
tCentroid(tcbuffer) → tgeompoint
WITH Temp(temp) AS ( SELECT tcbuffer '[Cbuffer(Point(1 1), 0.1)@2001-01-01, Cbuffer(Point(1 1), 0.3)@2001-01-03)' UNION SELECT tcbuffer '[Cbuffer(Point(1 1), 0.2)@2001-01-01, Cbuffer(Point(1 1), 0.4)@2001-01-03)' UNION SELECT tcbuffer '[Cbuffer(Point(1 1), 0.3)@2001-01-01, Cbuffer(Point(1 1), 0.5)@2001-01-03)' ) SELECT astext(tCentroid(Temp)) FROM Temp; /* {[POINT(72.451531682218 76.5231414472853)@2001-01-01, POINT(55.7001249027598 72.9552602410653)@2001-01-03)} */