MobilityDB  1.0
tpoint_aggfuncs.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * This MobilityDB code is provided under The PostgreSQL License.
4  *
5  * Copyright (c) 2016-2021, Université libre de Bruxelles and MobilityDB
6  * contributors
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation for any purpose, without fee, and without a written
10  * agreement is hereby granted, provided that the above copyright notice and
11  * this paragraph and the following two paragraphs appear in all copies.
12  *
13  * IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR
14  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
15  * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
16  * EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY
17  * OF SUCH DAMAGE.
18  *
19  * UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES,
20  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON
22  * AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO
23  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 
24  *
25  *****************************************************************************/
26 
32 #ifndef __TPOINT_AGGFUNCS_H__
33 #define __TPOINT_AGGFUNCS_H__
34 
35 #include <postgres.h>
36 #include <fmgr.h>
37 #include <catalog/pg_type.h>
38 
39 #include "general/temporal.h"
40 #include "general/skiplist.h"
41 
42 /*****************************************************************************/
43 
50 {
51  int32_t srid;
52  bool hasz;
53 };
54 
55 extern void geoaggstate_check_t(const SkipList *state, const Temporal *t);
56 
57 /*****************************************************************************/
58 
59 extern Datum tpoint_extent_transfn(PG_FUNCTION_ARGS);
60 extern Datum tpoint_extent_combinefn(PG_FUNCTION_ARGS);
61 
62 extern Datum tpoint_tcentroid_transfn(PG_FUNCTION_ARGS);
63 extern Datum tpoint_tcentroid_combinefn(PG_FUNCTION_ARGS);
64 extern Datum tpoint_tcentroid_finalfn(PG_FUNCTION_ARGS);
65 
66 extern Temporal **tpoint_transform_tcentroid(const Temporal *temp, int *count);
67 
68 /*****************************************************************************/
69 
70 #endif
Structure storing the SRID and the dimensionality of the temporal point values for aggregation...
Definition: tpoint_aggfuncs.h:49
Skiplist data structure used for performing aggregates.
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: temporal.h:241
Datum tpoint_tcentroid_finalfn(PG_FUNCTION_ARGS)
Final function for temporal centroid aggregation of temporal point values.
Definition: tpoint_aggfuncs.c:445
Datum tpoint_tcentroid_transfn(PG_FUNCTION_ARGS)
Transition function for temporal centroid aggregation of temporal point values.
Definition: tpoint_aggfuncs.c:285
int32_t srid
Definition: tpoint_aggfuncs.h:51
Datum tpoint_extent_transfn(PG_FUNCTION_ARGS)
Transition function for temporal extent aggregation of temporal point values.
Definition: tpoint_aggfuncs.c:219
Basic functions for temporal types of any subtype.
Datum tpoint_tcentroid_combinefn(PG_FUNCTION_ARGS)
Combine function for temporal centroid aggregation of temporal point values.
Definition: tpoint_aggfuncs.c:333
Structure to represent skiplists that keep the current state of an aggregation.
Definition: skiplist.h:77
Datum tpoint_extent_combinefn(PG_FUNCTION_ARGS)
Combine function for temporal extent aggregation of temporal point values.
Definition: tpoint_aggfuncs.c:256
bool hasz
Definition: tpoint_aggfuncs.h:52
Temporal ** tpoint_transform_tcentroid(const Temporal *temp, int *count)
Transform a temporal point value for performing temporal centroid aggregation (dispatch function) ...
Definition: tpoint_aggfuncs.c:181
void geoaggstate_check_t(const SkipList *state, const Temporal *t)
Check the validity of the temporal point values for aggregation.
Definition: tpoint_aggfuncs.c:91