Las tres funciones agregadas para puntos de red temporales se ilustran a continuación.
Conteo temporal
tCount(tnpoint) → {tintSeq,tintSeqSet}
WITH Temp(temp) AS ( SELECT tnpoint '[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.3)@2001-01-03)' UNION SELECT tnpoint '[NPoint(1, 0.2)@2001-01-02, NPoint(1, 0.4)@2001-01-04)' UNION SELECT tnpoint '[NPoint(1, 0.3)@2001-01-03, NPoint(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)}
Conteo de ventana
wCount(tnpoint) → {tintSeq,tintSeqSet}
WITH Temp(temp) AS ( SELECT tnpoint '[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.3)@2001-01-03)' UNION SELECT tnpoint '[NPoint(1, 0.2)@2001-01-02, NPoint(1, 0.4)@2001-01-04)' UNION SELECT tnpoint '[NPoint(1, 0.3)@2001-01-03, NPoint(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)} */
Centroide temporal
tCentroid(tnpoint) → tgeompoint
WITH Temp(temp) AS ( SELECT tnpoint '[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.3)@2001-01-03)' UNION SELECT tnpoint '[NPoint(1, 0.2)@2001-01-01, NPoint(1, 0.4)@2001-01-03)' UNION SELECT tnpoint '[NPoint(1, 0.3)@2001-01-01, NPoint(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)} */