MobilityDB 1.1
meos_export.in.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * This MobilityDB code is provided under The PostgreSQL License.
4 * Copyright (c) 2016-2023, Université libre de Bruxelles and MobilityDB
5 * contributors
6 *
7 * MobilityDB includes portions of PostGIS version 3 source code released
8 * under the GNU General Public License (GPLv2 or later).
9 * Copyright (c) 2001-2023, PostGIS contributors
10 *
11 * Permission to use, copy, modify, and distribute this software and its
12 * documentation for any purpose, without fee, and without a written
13 * agreement is hereby granted, provided that the above copyright notice and
14 * this paragraph and the following two paragraphs appear in all copies.
15 *
16 * IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR
17 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
18 * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
19 * EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY
20 * OF SUCH DAMAGE.
21 *
22 * UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES,
23 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON
25 * AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO
26 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 
27 *
28 *****************************************************************************/
29
34#ifndef __MEOS_H__
35#define __MEOS_H__
36
37/* C */
38#include <stdbool.h>
39#include <stdint.h>
40/* PostgreSQL */
41@POSTGRES_DEFS@
42/* PostGIS */
43@POSTGIS_DEFS@
44
45/*****************************************************************************
46 * Type definitions
47 *****************************************************************************/
48
52typedef struct
53{
54 int32 vl_len_;
55 uint8 settype;
56 uint8 basetype;
57 int16 flags;
58 int32 count;
59 int32 maxcount;
60 int32 bboxsize;
61} Set;
62
66typedef struct
67{
68 uint8 spantype;
69 uint8 basetype;
70 bool lower_inc;
71 bool upper_inc;
72 Datum lower;
73 Datum upper;
74} Span;
75
79typedef struct
80{
81 int32 vl_len_;
82 uint8 spansettype;
83 uint8 spantype;
84 uint8 basetype;
85 int32 count;
86 Span span;
87 Span elems[1];
88} SpanSet;
89
93typedef struct
94{
95 Span period;
96 Span span;
97 int16 flags;
98} TBox;
99
103typedef struct
104{
105 Span period;
106 double xmin;
107 double xmax;
108 double ymin;
109 double ymax;
110 double zmin;
111 double zmax;
112 int32 srid;
113 int16 flags;
114} STBox;
115
120typedef enum
121{
124 STEP = 2,
126} interpType;
127
132typedef struct
133{
134 int32 vl_len_;
135 uint8 temptype;
136 uint8 subtype;
137 int16 flags;
138 /* variable-length data follows */
139} Temporal;
140
144typedef struct
145{
146 int32 vl_len_;
147 uint8 temptype;
148 uint8 subtype;
149 int16 flags;
150 TimestampTz t;
151 Datum value;
155 /* variable-length data follows */
156} TInstant;
157
161typedef struct
162{
163 int32 vl_len_;
164 uint8 temptype;
165 uint8 subtype;
166 int16 flags;
167 int32 count;
168 int32 maxcount;
169 int16 bboxsize;
170 Span period;
174 /* variable-length data follows */
175} TSequence;
176
177#define TSEQUENCE_BBOX_PTR(seq) ((void *)(&(seq)->period))
178
182typedef struct
183{
184 int32 vl_len_;
185 uint8 temptype;
186 uint8 subtype;
187 int16 flags;
188 int32 count;
189 int32 totalcount;
191 int32 maxcount;
192 int16 bboxsize;
193 Span period;
197 /* variable-length data follows */
199
200#define TSEQUENCESET_BBOX_PTR(ss) ((void *)(&(ss)->period))
201
205typedef struct
206{
207 int i;
208 int j;
209} Match;
210
211/*****************************************************************************/
212
217#define SKIPLIST_MAXLEVEL 32
219typedef struct
220{
221 void *value;
222 int height;
223 int next[SKIPLIST_MAXLEVEL];
225
226typedef enum
227{
232
236typedef struct
237{
238 SkipListElemType elemtype;
239 int capacity;
240 int next;
241 int length;
242 int *freed;
243 int freecount;
244 int freecap;
245 int tail;
246 void *extra;
247 size_t extrasize;
248 SkipListElem *elems;
249} SkipList;
250
251/*****************************************************************************
252 * Initialization of the MEOS library
253 *****************************************************************************/
254
255extern void meos_initialize(const char *tz_str);
256extern void meos_finalize(void);
257
258/*****************************************************************************
259 * Functions for input/output PostgreSQL time types
260 *****************************************************************************/
261
262extern bool bool_in(const char *in_str);
263extern char *bool_out(bool b);
264extern DateADT pg_date_in(const char *str);
265extern char *pg_date_out(DateADT date);
266extern int pg_interval_cmp(const Interval *interval1, const Interval *interval2);
267extern Interval *pg_interval_in(const char *str, int32 typmod);
268extern Interval *pg_interval_make(int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs);
269extern Interval *pg_interval_mul(const Interval *span, double factor);
270extern char *pg_interval_out(const Interval *span);
271extern Interval *pg_interval_pl(const Interval *span1, const Interval *span2);
272extern TimeADT pg_time_in(const char *str, int32 typmod);
273extern char *pg_time_out(TimeADT time);
274extern Timestamp pg_timestamp_in(const char *str, int32 typmod);
276extern TimestampTz pg_timestamp_mi_interval(TimestampTz timestamp, const Interval *span);
277extern char *pg_timestamp_out(Timestamp dt);
278extern TimestampTz pg_timestamp_pl_interval(TimestampTz timestamp, const Interval *span);
279extern TimestampTz pg_timestamptz_in(const char *str, int32 typmod);
280extern char *pg_timestamptz_out(TimestampTz dt);
281
282/*****************************************************************************
283 * Functions for input/output and manipulation of PostGIS types
284 *****************************************************************************/
285
286extern bytea *gserialized_as_ewkb(const GSERIALIZED *geom, char *type);
287extern char *gserialized_as_ewkt(const GSERIALIZED *geom, int precision);
288extern char *gserialized_as_geojson(const GSERIALIZED *geom, int option, int precision, char *srs);
289extern char *gserialized_as_hexewkb(const GSERIALIZED *geom, const char *type);
290extern char *gserialized_as_text(const GSERIALIZED *geom, int precision);
291extern GSERIALIZED *gserialized_from_ewkb(const bytea *bytea_wkb, int32 srid);
292extern GSERIALIZED *gserialized_from_geojson(const char *geojson);
293extern GSERIALIZED *gserialized_from_hexewkb(const char *wkt);
294extern GSERIALIZED *gserialized_from_text(char *wkt, int srid);
295extern GSERIALIZED *gserialized_in(char *input, int32 geom_typmod);
296extern char *gserialized_out(const GSERIALIZED *geom);
297extern bool pgis_gserialized_same(const GSERIALIZED *geom1, const GSERIALIZED *geom2);
298
299/*****************************************************************************
300 * Functions for set and span types
301 *****************************************************************************/
302
303/* Input/output functions for set and span types */
304
305extern Set *bigintset_in(const char *str);
306extern Span *bigintspan_in(const char *str);
307extern char *bigintspan_out(const Span *s);
308extern SpanSet *bigintspanset_in(const char *str);
310extern Set *floatset_in(const char *str);
311extern Span *floatspan_in(const char *str);
312extern char *floatspan_out(const Span *s, int maxdd);
313extern SpanSet *floatspanset_in(const char *str);
314extern char *floatspanset_out(const SpanSet *ss, int maxdd);
315extern Set *intset_in(const char *str);
316extern Span *intspan_in(const char *str);
317extern char *intspan_out(const Span *s);
318extern SpanSet *intspanset_in(const char *str);
319extern char *intspanset_out(const SpanSet *ss);
320extern uint8_t *set_as_wkb(const Set *s, uint8_t variant, size_t *size_out);
321extern Set *set_from_hexwkb(const char *hexwkb);
322extern Set *set_from_wkb(const uint8_t *wkb, int size);
323extern char *set_out(const Set *s, int maxdd);
324extern Span *period_in(const char *str);
325extern char *period_out(const Span *s);
326extern SpanSet *periodset_in(const char *str);
327extern char *periodset_out(const SpanSet *ss);
328extern uint8_t *span_as_wkb(const Span *s, uint8_t variant, size_t *size_out);
329extern Span *span_from_hexwkb(const char *hexwkb);
330extern Span *span_from_wkb(const uint8_t *wkb, int size);
331extern char *span_out(const Span *s, int maxdd);
332extern uint8_t *spanset_as_wkb(const SpanSet *ss, uint8_t variant, size_t *size_out);
333extern SpanSet *spanset_from_hexwkb(const char *hexwkb);
334extern SpanSet *spanset_from_wkb(const uint8_t *wkb, int size);
335extern char *spanset_out(const SpanSet *ss, int maxdd);
336extern Set *tstzset_in(const char *str);
337
338/*****************************************************************************/
339
340/* Constructor functions for set and span types */
341
342extern Span *bigintspan_make(int64 lower, int64 upper, bool lower_inc, bool upper_inc);
343extern Span *floatspan_make(double lower, double upper, bool lower_inc, bool upper_inc);
344extern Span *intspan_make(int lower, int upper, bool lower_inc, bool upper_inc);
345extern Set *set_copy(const Set *ts);
346extern Span *period_make(TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc);
347extern Span *span_copy(const Span *s);
348extern SpanSet *spanset_copy(const SpanSet *ps);
349extern SpanSet *spanset_make(const Span **spans, int count, bool normalize);
350extern SpanSet *spanset_make_free(Span **spans, int count, bool normalize);
351
352/*****************************************************************************/
353
354/* Cast functions for set and span types */
355
356extern Set *bigint_to_bigintset(int64 i);
357extern Span *bigint_to_intspan(int i);
358extern Span *float_to_floaspan(double d);
359extern Set *float_to_floatset(double d);
360extern Set *int_to_intset(int i);
361extern Span *int_to_intspan(int i);
362extern void set_set_span(const Set *os, Span *s);
363extern Span *set_to_span(const Set *s);
364extern void spatialset_set_stbox(const Set *set, STBox *box);
365extern STBox *spatialset_to_stbox(const Set *s);
366extern SpanSet *set_to_spanset(const Set *s);
367extern SpanSet *span_to_spanset(const Span *s);
372
373/*****************************************************************************/
374
375/* Accessor functions for set and span types */
376
377extern int64 bigintset_end_value(const Set *s);
378extern int bigintset_num_values(const Set *s);
379extern int64 bigintset_start_value(const Set *s);
380extern bool bigintset_value_n(const Set *s, int n, int64 *result);
381extern int64 *bigintset_values(const Set *s);
382extern int bigintspan_lower(const Span *s);
383extern int bigintspan_upper(const Span *s);
384extern int bigintspanset_lower(const SpanSet *ss);
385extern int bigintspanset_upper(const SpanSet *ss);
386extern double floatset_end_value(const Set *s);
387extern int floatset_num_values(const Set *s);
388extern double floatset_start_value(const Set *s);
389extern bool floatset_value_n(const Set *s, int n, double *result);
390extern double *floatset_values(const Set *s);
391extern double floatspan_lower(const Span *s);
392extern double floatspan_upper(const Span *s);
393extern double floatspanset_lower(const SpanSet *ss);
394extern double floatspanset_upper(const SpanSet *ss);
395extern int intset_end_value(const Set *s);
396extern int intset_num_values(const Set *s);
397extern int intset_start_value(const Set *s);
398extern bool intset_value_n(const Set *s, int n, int *result);
399extern int *intset_values(const Set *s);
400extern int intspan_lower(const Span *s);
401extern int intspan_upper(const Span *s);
402extern int intspanset_lower(const SpanSet *ss);
403extern int intspanset_upper(const SpanSet *ss);
404extern Datum set_end_value(const Set *s);
405extern uint32 set_hash(const Set *s);
406extern uint64 set_hash_extended(const Set *s, uint64 seed);
407extern int set_mem_size(const Set *s);
408extern int set_num_values(const Set *s);
409extern Datum set_start_value(const Set *s);
410extern bool set_value_n(const Set *s, int n, Datum *result);
411extern Datum *set_values(const Set *s);
412extern Interval *period_duration(const Span *s);
413extern TimestampTz period_lower(const Span *p);
414extern TimestampTz period_upper(const Span *p);
415extern Interval *periodset_duration(const SpanSet *ps, bool boundspan);
417extern TimestampTz periodset_lower(const SpanSet *ps);
418extern int periodset_num_timestamps(const SpanSet *ps);
420extern bool periodset_timestamp_n(const SpanSet *ps, int n, TimestampTz *result);
421extern TimestampTz *periodset_timestamps(const SpanSet *ps, int *count);
422extern TimestampTz periodset_upper(const SpanSet *ps);
423extern uint32 span_hash(const Span *s);
424extern uint64 span_hash_extended(const Span *s, Datum seed);
425extern bool span_lower_inc(const Span *s);
426extern bool span_upper_inc(const Span *s);
427extern double span_width(const Span *s);
428extern Span *spanset_end_span(const SpanSet *ss);
429extern uint32 spanset_hash(const SpanSet *ps);
430extern uint64 spanset_hash_extended(const SpanSet *ps, uint64 seed);
431extern bool spanset_lower_inc(const SpanSet *ss);
432extern int spanset_mem_size(const SpanSet *ss);
433extern int spanset_num_spans(const SpanSet *ss);
434extern Span *spanset_span_n(const SpanSet *ss, int i);
435extern const Span **spanset_spans(const SpanSet *ss, int *count);
436extern Span *spanset_start_span(const SpanSet *ss);
437extern bool spanset_upper_inc(const SpanSet *ss);
438extern double spanset_width(const SpanSet *ss);
439extern TimestampTz tstzset_end_timestamp(const Set *ts);
440extern int tstzset_num_timestamps(const Set *ts);
441extern TimestampTz tstzset_start_timestamp(const Set *ts);
442extern bool tstzset_timestamp_n(const Set *ts, int n, TimestampTz *result);
443extern TimestampTz *tstzset_timestamps(const Set *ts);
444extern int geoset_srid(const Set *set);
445
446/*****************************************************************************/
447
448/* Transformation functions for set and span types */
449
450extern void bigintspan_set_floatspan(const Span *s1, Span *s2);
451extern void floatspan_set_bigintspan(const Span *s1, Span *s2);
452extern void floatspan_set_intspan(const Span *s1, Span *s2);
453extern void intspan_set_floatspan(const Span *s1, Span *s2);
454extern void numspan_set_floatspan(const Span *s1, Span *s2);
455extern Span *period_tprecision(const Span *s, const Interval *duration, TimestampTz torigin);
456extern SpanSet *periodset_tprecision(const SpanSet *ss, const Interval *duration, TimestampTz torigin);
457extern void period_shift_tscale(Span *p, const Interval *shift, const Interval *duration);
458extern SpanSet *periodset_shift_tscale(const SpanSet *ps, const Interval *shift, const Interval *duration);
459extern Set *set_shift(const Set *s, Datum shift);
460extern void span_expand(const Span *s1, Span *s2);
461extern TimestampTz timestamp_tprecision(TimestampTz t, const Interval *duration, TimestampTz torigin);
462extern Set *tstzset_shift_tscale(const Set *ts, const Interval *shift, const Interval *duration);
463
464/*****************************************************************************
465 * Bounding box functions for set and span types
466 *****************************************************************************/
467
468/* Topological functions for set and span types */
469
470extern bool adjacent_bigintspan_bigint(const Span *s, int64 i);
471extern bool adjacent_bigintspanset_bigint(const SpanSet *ss, int64 i);
472extern bool adjacent_floatspan_float(const Span *s, double d);
473extern bool adjacent_intspan_int(const Span *s, int i);
474extern bool adjacent_set_span(const Set *os, const Span *s);
475extern bool adjacent_set_spanset(const Set *s, const SpanSet *ss);
476extern bool adjacent_periodset_timestamp(const SpanSet *ps, TimestampTz t);
477extern bool adjacent_span_set(const Span *s, const Set *os);
478extern bool adjacent_span_span(const Span *s1, const Span *s2);
479extern bool adjacent_span_spanset(const Span *s, const SpanSet *ss);
480extern bool adjacent_spanset_set(const SpanSet *ss, const Set *s);
481extern bool adjacent_spanset_span(const SpanSet *ss, const Span *s);
482extern bool adjacent_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
483extern bool contained_bigint_bigintset(int64 i, const Set *s);
484extern bool contained_bigint_bigintspan(int64 i, const Span *s);
485extern bool contained_bigint_bigintspanset(int64 i, const SpanSet *ss);
486extern bool contained_float_floatset(double d, const Set *s);
487extern bool contained_float_floatspan(double d, const Span *s);
488extern bool contained_float_floatspanset(double d, const SpanSet *ss);
489extern bool contained_int_intset(int i, const Set *s);
490extern bool contained_int_intspanset (int i, const SpanSet *ss);
491extern bool contained_int_intspan(int i, const Span *s);
492extern bool contained_set_set(const Set *s1, const Set *s2);
493extern bool contained_set_span(const Set *os, const Span *s);
494extern bool contained_set_spanset(const Set *s, const SpanSet *ss);
495extern bool contained_span_span(const Span *s1, const Span *s2);
496extern bool contained_span_spanset(const Span *s, const SpanSet *ss);
497extern bool contained_spanset_span(const SpanSet *ss, const Span *s);
498extern bool contained_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
499extern bool contained_timestamp_period(TimestampTz t, const Span *p);
500extern bool contained_timestamp_timestampset(TimestampTz t, const Set *ts);
501extern bool contained_timestampset_timestampset(const Set *ts1, const Set *ts2);
502extern bool contains_floatspan_float(const Span *s, double d);
503extern bool contains_intspan_int(const Span *s, int i);
504extern bool contains_set_set(const Set *s1, const Set *s2);
505extern bool contains_period_timestamp(const Span *p, TimestampTz t);
506extern bool contains_periodset_timestamp(const SpanSet *ps, TimestampTz t);
507extern bool contains_span_set(const Span *s, const Set *os);
508extern bool contains_span_span(const Span *s1, const Span *s2);
509extern bool contains_span_spanset(const Span *s, const SpanSet *ss);
510extern bool contains_spanset_set(const SpanSet *ss, const Set *s);
511extern bool contains_spanset_span(const SpanSet *ss, const Span *s);
512extern bool contains_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
513extern bool contains_timestampset_timestamp(const Set *ts, TimestampTz t);
514extern bool contains_timestampset_timestampset(const Set *ts1, const Set *ts2);
515extern bool overlaps_set_set(const Set *s1, const Set *s2);
516extern bool overlaps_span_set(const Span *s, const Set *os);
517extern bool overlaps_span_span(const Span *s1, const Span *s2);
518extern bool overlaps_spanset_set(const SpanSet *ss, const Set *s);
519extern bool overlaps_spanset_span(const SpanSet *ss, const Span *s);
520extern bool overlaps_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
521extern bool overlaps_timestampset_period(const Set *ts, const Span *p);
522
523/*****************************************************************************/
524
525/* Position functions for set and span types */
526
527extern bool after_timestamp_timestampset(TimestampTz t, const Set *ts);
528extern bool before_periodset_timestamp(const SpanSet *ps, TimestampTz t);
529extern bool before_timestamp_timestampset(TimestampTz t, const Set *ts);
530extern bool left_float_floatspan(double d, const Span *s);
531extern bool left_floatspan_float(const Span *s, double d);
532extern bool left_int_intspan(int i, const Span *s);
533extern bool left_intspan_int(const Span *s, int i);
534extern bool left_set_set(const Set *s1, const Set *s2);
535extern bool left_set_span(const Set *os, const Span *s);
536extern bool left_set_spanset(const Set *s, const SpanSet *ss);
537extern bool left_span_set(const Span *s, const Set *os);
538extern bool left_span_span(const Span *s1, const Span *s2);
539extern bool left_span_spanset(const Span *s, const SpanSet *ss);
540extern bool left_spanset_set(const SpanSet *ss, const Set *s);
541extern bool left_spanset_span(const SpanSet *ss, const Span *s);
542extern bool left_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
543extern bool overafter_period_timestamp(const Span *p, TimestampTz t);
544extern bool overafter_periodset_timestamp(const SpanSet *ps, TimestampTz t);
545extern bool overafter_timestamp_period(TimestampTz t, const Span *p);
546extern bool overafter_timestamp_periodset(TimestampTz t, const SpanSet *ps);
547extern bool overafter_timestamp_timestampset(TimestampTz t, const Set *ts);
548extern bool overbefore_period_timestamp(const Span *p, TimestampTz t);
549extern bool overbefore_periodset_timestamp(const SpanSet *ps, TimestampTz t);
550extern bool overbefore_timestamp_period(TimestampTz t, const Span *p);
551extern bool overbefore_timestamp_periodset(TimestampTz t, const SpanSet *ps);
552extern bool overbefore_timestamp_timestampset(TimestampTz t, const Set *ts);
553extern bool overleft_float_floatspan(double d, const Span *s);
554extern bool overleft_floatspan_float(const Span *s, double d);
555extern bool overleft_int_intspan(int i, const Span *s);
556extern bool overleft_intspan_int(const Span *s, int i);
557extern bool overleft_set_set(const Set *s1, const Set *s2);
558extern bool overleft_set_span(const Set *os, const Span *s);
559extern bool overleft_set_spanset(const Set *s, const SpanSet *ss);
560extern bool overleft_span_set(const Span *s, const Set *os);
561extern bool overleft_span_span(const Span *s1, const Span *s2);
562extern bool overleft_span_spanset(const Span *s, const SpanSet *ss);
563extern bool overleft_spanset_set(const SpanSet *ss, const Set *s);
564extern bool overleft_spanset_span(const SpanSet *ss, const Span *s);
565extern bool overleft_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
566extern bool overright_float_floatspan(double d, const Span *s);
567extern bool overright_floatspan_float(const Span *s, double d);
568extern bool overright_int_intspan(int i, const Span *s);
569extern bool overright_intspan_int(const Span *s, int i);
570extern bool overright_set_set(const Set *s1, const Set *s2);
571extern bool overright_set_span(const Set *os, const Span *s);
572extern bool overright_set_spanset(const Set *s, const SpanSet *ss);
573extern bool overright_span_set(const Span *s, const Set *os);
574extern bool overright_span_span(const Span *s1, const Span *s2);
575extern bool overright_span_spanset(const Span *s, const SpanSet *ss);
576extern bool overright_spanset_set(const SpanSet *ss, const Set *s);
577extern bool overright_spanset_span(const SpanSet *ss, const Span *s);
578extern bool overright_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
579extern bool right_float_floatspan(double d, const Span *s);
580extern bool right_floatspan_float(const Span *s, double d);
581extern bool right_int_intspan(int i, const Span *s);
582extern bool right_intspan_int(const Span *s, int i);
583extern bool right_set_set(const Set *s1, const Set *s2);
584extern bool right_set_span(const Set *os, const Span *s);
585extern bool right_set_spanset(const Set *s, const SpanSet *ss);
586extern bool right_span_set(const Span *s, const Set *os);
587extern bool right_span_span(const Span *s1, const Span *s2);
588extern bool right_span_spanset(const Span *s, const SpanSet *ss);
589extern bool right_spanset_set(const SpanSet *ss, const Set *s);
590extern bool right_spanset_span(const SpanSet *ss, const Span *s);
591extern bool right_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
592
593/*****************************************************************************/
594
595/* Set functions for set and span types */
596
597extern Span *bbox_union_span_span(const Span *s1, const Span *s2);
598extern Set *intersection_set_set(const Set *s1, const Set *s2);
599extern bool intersection_period_timestamp(const Span *p, TimestampTz t, TimestampTz *result);
600extern bool intersection_periodset_timestamp(const SpanSet *ps, TimestampTz t, TimestampTz *result);
601extern Set *intersection_span_set(const Span *s, const Set *os);
602extern Span *intersection_span_span(const Span *s1, const Span *s2);
603extern Set *intersection_spanset_set(const SpanSet *ss, const Set *s);
604extern SpanSet *intersection_spanset_span(const SpanSet *ss, const Span *s);
605extern SpanSet *intersection_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
607extern Set *intersection_timestampset_period(const Set *ts, const Span *p);
609extern bool intersection_timestampset_timestamp(const Set *ts, const TimestampTz t, TimestampTz *result);
610extern Set *intersection_timestampset_timestampset(const Set *ts1, const Set *ts2);
611extern Set *minus_set_set(const Set *s1, const Set *s2);
612extern Set *minus_set_span(const Set *os, const Span *s);
613extern Set *minus_set_spanset(const Set *s, const SpanSet *ss);
616extern SpanSet *minus_span_set(const Span *s, const Set *os);
617extern SpanSet *minus_span_span(const Span *s1, const Span *s2);
618extern SpanSet *minus_span_spanset(const Span *s, const SpanSet *ss);
619extern SpanSet *minus_spanset_set(const SpanSet *ss, const Set *s);
620extern SpanSet *minus_spanset_span(const SpanSet *ss, const Span *s);
621extern SpanSet *minus_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
622extern bool minus_timestamp_period(TimestampTz t, const Span *p, TimestampTz *result);
623extern bool minus_timestamp_periodset(TimestampTz t, const SpanSet *ps, TimestampTz *result);
624extern Set *minus_timestampset_timestamp(const Set *ts, TimestampTz t);
625extern Set *minus_timestampset_timestampset(const Set *ts1, const Set *ts2);
626extern Set *union_set_set(const Set *s1, const Set *s2);
628extern SpanSet *union_period_timestampset(const Span *p, const Set *ts);
630extern SpanSet *union_span_set(const Span *s, const Set *os);
631extern SpanSet *union_span_span(const Span *s1, const Span *s2);
632extern SpanSet *union_spanset_set(const SpanSet *ss, const Set *s);
633extern SpanSet *union_spanset_span(const SpanSet *ss, const Span *s);
634extern SpanSet *union_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
637extern Set *union_timestamp_timestampset(TimestampTz t, const Set *ts);
638extern SpanSet *union_timestampset_period(const Set *ts, const Span *p);
639extern Set *union_timestampset_timestamp(const Set *ts, const TimestampTz t);
640
641/*****************************************************************************/
642
643/* Distance functions for set and span types */
644
645extern double distance_floatspan_float(const Span *s, double d);
646extern double distance_intspan_int(const Span *s, int i);
647extern double distance_set_set(const Set *s1, const Set *s2);
648extern double distance_period_periodset(const Span *p, const SpanSet *ps);
649extern double distance_period_timestamp(const Span *p, TimestampTz t);
650extern double distance_period_timestampset(const Span *p, const Set *ts);
651extern double distance_periodset_period(const SpanSet *ps, const Span *p);
652extern double distance_periodset_periodset(const SpanSet *ps1, const SpanSet *ps2);
653extern double distance_periodset_timestamp(const SpanSet *ps, TimestampTz t);
654extern double distance_periodset_timestampset(const SpanSet *ps, const Set *ts);
655extern double distance_span_set(const Span *s, const Set *os);
656extern double distance_span_span(const Span *s1, const Span *s2);
657extern double distance_spanset_span(const SpanSet *ss, const Span *s);
658extern double distance_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
659extern double distance_timestamp_period(TimestampTz t, const Span *p);
663extern double distance_timestampset_period(const Set *ts, const Span *p);
664extern double distance_timestampset_periodset(const Set *ts, const SpanSet *ps);
665extern double distance_timestampset_timestamp(const Set *ts, TimestampTz t);
666extern double distance_timestampset_timestampset(const Set *ts1, const Set *ts2);
667
668/*****************************************************************************/
669
670/* Aggregate functions for set and span types */
671
672extern Span *bigint_extent_transfn(Span *s, int64 i);
674extern Span *int_extent_transfn(Span *s, int i);
676extern Span *float_extent_transfn(Span *s, double d);
677extern Set *floatset_agg_transfn(Set *state, double d);
683extern Set *set_agg_combinefn(Set *state1, Set *state2);
684extern Set *set_agg_finalfn(Set *state);
685extern Span *span_extent_transfn(Span *s1, const Span *s2);
686extern Span *spanset_extent_transfn(Span *s, const SpanSet *ss);
687extern Set *textset_agg_transfn(Set *state, const text *txt);
693extern Span *set_extent_transfn(Span *span, const Set *set);
696
697/*****************************************************************************/
698
699/* Comparison functions for set and span types */
700
701extern int bigintset_cmp(const Set *s1, const Set *s2);
702extern bool bigintset_eq(const Set *s1, const Set *s2);
703extern bool bigintset_ge(const Set *s1, const Set *s2);
704extern bool bigintset_gt(const Set *s1, const Set *s2);
705extern bool bigintset_le(const Set *s1, const Set *s2);
706extern bool bigintset_lt(const Set *s1, const Set *s2);
707extern bool bigintset_ne(const Set *s1, const Set *s2);
708extern int floatset_cmp(const Set *s1, const Set *s2);
709extern bool floatset_eq(const Set *s1, const Set *s2);
710extern bool floatset_ge(const Set *s1, const Set *s2);
711extern bool floatset_gt(const Set *s1, const Set *s2);
712extern bool floatset_le(const Set *s1, const Set *s2);
713extern bool floatset_lt(const Set *s1, const Set *s2);
714extern bool floatset_ne(const Set *s1, const Set *s2);
715extern int intset_cmp(const Set *s1, const Set *s2);
716extern bool intset_eq(const Set *s1, const Set *s2);
717extern bool intset_ge(const Set *s1, const Set *s2);
718extern bool intset_gt(const Set *s1, const Set *s2);
719extern bool intset_le(const Set *s1, const Set *s2);
720extern bool intset_lt(const Set *s1, const Set *s2);
721extern bool intset_ne(const Set *s1, const Set *s2);
722extern int set_cmp(const Set *s1, const Set *s2);
723extern bool set_eq(const Set *s1, const Set *s2);
724extern bool set_ge(const Set *s1, const Set *s2);
725extern bool set_gt(const Set *s1, const Set *s2);
726extern bool set_le(const Set *s1, const Set *s2);
727extern bool set_lt(const Set *s1, const Set *s2);
728extern bool set_ne(const Set *s1, const Set *s2);
729extern int span_cmp(const Span *s1, const Span *s2);
730extern bool span_eq(const Span *s1, const Span *s2);
731extern bool span_ge(const Span *s1, const Span *s2);
732extern bool span_gt(const Span *s1, const Span *s2);
733extern bool span_le(const Span *s1, const Span *s2);
734extern bool span_lt(const Span *s1, const Span *s2);
735extern bool span_ne(const Span *s1, const Span *s2);
736extern int spanset_cmp(const SpanSet *ss1, const SpanSet *ss2);
737extern bool spanset_eq(const SpanSet *ss1, const SpanSet *ss2);
738extern bool spanset_ge(const SpanSet *ss1, const SpanSet *ss2);
739extern bool spanset_gt(const SpanSet *ss1, const SpanSet *ss2);
740extern bool spanset_le(const SpanSet *ss1, const SpanSet *ss2);
741extern bool spanset_lt(const SpanSet *ss1, const SpanSet *ss2);
742extern bool spanset_ne(const SpanSet *ss1, const SpanSet *ss2);
743extern int tstzset_cmp(const Set *ts1, const Set *ts2);
744extern bool tstzset_eq(const Set *ts1, const Set *ts2);
745extern bool tstzset_ge(const Set *ts1, const Set *ts2);
746extern bool tstzset_gt(const Set *ts1, const Set *ts2);
747extern bool tstzset_le(const Set *ts1, const Set *ts2);
748extern bool tstzset_lt(const Set *ts1, const Set *ts2);
749extern bool tstzset_ne(const Set *ts1, const Set *ts2);
750
751/******************************************************************************
752 * Functions for box types
753 *****************************************************************************/
754
755/* Input/output functions for box types */
756
757extern TBox *tbox_in(const char *str);
758extern char *tbox_out(const TBox *box, int maxdd);
759extern TBox *tbox_from_wkb(const uint8_t *wkb, int size);
760extern TBox *tbox_from_hexwkb(const char *hexwkb);
761extern STBox *stbox_from_wkb(const uint8_t *wkb, int size);
762extern STBox *stbox_from_hexwkb(const char *hexwkb);
763extern uint8_t *tbox_as_wkb(const TBox *box, uint8_t variant, size_t *size_out);
764extern char *tbox_as_hexwkb(const TBox *box, uint8_t variant, size_t *size);
765extern uint8_t *stbox_as_wkb(const STBox *box, uint8_t variant, size_t *size_out);
766extern char *stbox_as_hexwkb(const STBox *box, uint8_t variant, size_t *size);
767extern STBox *stbox_in(const char *str);
768extern char *stbox_out(const STBox *box, int maxdd);
769
770/*****************************************************************************/
771
772/* Constructor functions for box types */
773
774extern TBox *tbox_make(const Span *p, const Span *s);
775extern void tbox_set(const Span *p, const Span *s, TBox *box);
776extern TBox *tbox_copy(const TBox *box);
777extern STBox * stbox_make(bool hasx, bool hasz, bool geodetic, int32 srid,
778 double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const Span *p);
779extern void stbox_set(bool hasx, bool hasz, bool geodetic, int32 srid, double xmin, double xmax,
780 double ymin, double ymax, double zmin, double zmax, const Span *p, STBox *box);
781extern STBox *stbox_copy(const STBox *box);
782
783/*****************************************************************************/
784
785/* Cast functions for box types */
786
787extern TBox *int_to_tbox(int i);
788extern TBox *float_to_tbox(double d);
789extern TBox *span_to_tbox(const Span *span);
791extern TBox *tstzset_to_tbox(const Set *ss);
792extern TBox *period_to_tbox(const Span *p);
793extern TBox *periodset_to_tbox(const SpanSet *ps);
794extern TBox *int_timestamp_to_tbox(int i, TimestampTz t);
795extern TBox *float_timestamp_to_tbox(double d, TimestampTz t);
796extern TBox *int_period_to_tbox(int i, const Span *p);
797extern TBox *float_period_to_tbox(double d, const Span *p);
798extern TBox *span_timestamp_to_tbox(const Span *span, TimestampTz t);
799extern TBox *span_period_to_tbox(const Span *span, const Span *p);
800extern Span *tbox_to_floatspan(const TBox *box);
801extern Span *tbox_to_period(const TBox *box);
802extern Span *stbox_to_period(const STBox *box);
803extern TBox *tnumber_to_tbox(const Temporal *temp);
804extern GSERIALIZED *stbox_to_geo(const STBox *box);
805extern STBox *tpoint_to_stbox(const Temporal *temp);
806extern STBox *geo_to_stbox(const GSERIALIZED *gs);
808extern STBox *tstzset_to_stbox(const Set *ts);
809extern STBox *period_to_stbox(const Span *p);
810extern STBox *periodset_to_stbox(const SpanSet *ps);
812extern STBox *geo_period_to_stbox(const GSERIALIZED *gs, const Span *p);
813
814/*****************************************************************************/
815
816/* Accessor functions for box types */
817
818extern bool tbox_hasx(const TBox *box);
819extern bool tbox_hast(const TBox *box);
820extern bool tbox_xmin(const TBox *box, double *result);
821extern bool tbox_xmax(const TBox *box, double *result);
822extern bool tbox_tmin(const TBox *box, TimestampTz *result);
823extern bool tbox_tmax(const TBox *box, TimestampTz *result);
824extern bool stbox_hasx(const STBox *box);
825extern bool stbox_hasz(const STBox *box);
826extern bool stbox_hast(const STBox *box);
827extern bool stbox_isgeodetic(const STBox *box);
828extern bool stbox_xmin(const STBox *box, double *result);
829extern bool stbox_xmax(const STBox *box, double *result);
830extern bool stbox_ymin(const STBox *box, double *result);
831extern bool stbox_ymax(const STBox *box, double *result);
832extern bool stbox_zmin(const STBox *box, double *result);
833extern bool stbox_zmax(const STBox *box, double *result);
834extern bool stbox_tmin(const STBox *box, TimestampTz *result);
835extern bool stbox_tmax(const STBox *box, TimestampTz *result);
836extern int32 stbox_srid(const STBox *box);
837
838/*****************************************************************************/
839
840/* Transformation functions for box types */
841
842extern void tbox_expand(const TBox *box1, TBox *box2);
843extern void tbox_shift_tscale(TBox *box, const Interval *start, const Interval *duration);
844extern TBox *tbox_expand_value(const TBox *box, const double d);
845extern TBox *tbox_expand_time(const TBox *box, const Interval *interval);
846extern void stbox_expand(const STBox *box1, STBox *box2);
847extern void stbox_shift_tscale(STBox *box, const Interval *start, const Interval *duration);
848extern STBox *stbox_set_srid(const STBox *box, int32 srid);
849extern STBox *stbox_expand_space(const STBox *box, double d);
850extern STBox *stbox_expand_time(const STBox *box, const Interval *interval);
851
852/*****************************************************************************/
853
854/* Topological functions for box types */
855
856extern bool contains_tbox_tbox(const TBox *box1, const TBox *box2);
857extern bool contained_tbox_tbox(const TBox *box1, const TBox *box2);
858extern bool overlaps_tbox_tbox(const TBox *box1, const TBox *box2);
859extern bool same_tbox_tbox(const TBox *box1, const TBox *box2);
860extern bool adjacent_tbox_tbox(const TBox *box1, const TBox *box2);
861extern bool contains_stbox_stbox(const STBox *box1, const STBox *box2);
862extern bool contained_stbox_stbox(const STBox *box1, const STBox *box2);
863extern bool overlaps_stbox_stbox(const STBox *box1, const STBox *box2);
864extern bool same_stbox_stbox(const STBox *box1, const STBox *box2);
865extern bool adjacent_stbox_stbox(const STBox *box1, const STBox *box2);
866
867/*****************************************************************************/
868
869/* Position functions for box types */
870
871extern bool left_tbox_tbox(const TBox *box1, const TBox *box2);
872extern bool overleft_tbox_tbox(const TBox *box1, const TBox *box2);
873extern bool right_tbox_tbox(const TBox *box1, const TBox *box2);
874extern bool overright_tbox_tbox(const TBox *box1, const TBox *box2);
875extern bool before_tbox_tbox(const TBox *box1, const TBox *box2);
876extern bool overbefore_tbox_tbox(const TBox *box1, const TBox *box2);
877extern bool after_tbox_tbox(const TBox *box1, const TBox *box2);
878extern bool overafter_tbox_tbox(const TBox *box1, const TBox *box2);
879extern bool left_stbox_stbox(const STBox *box1, const STBox *box2);
880extern bool overleft_stbox_stbox(const STBox *box1, const STBox *box2);
881extern bool right_stbox_stbox(const STBox *box1, const STBox *box2);
882extern bool overright_stbox_stbox(const STBox *box1, const STBox *box2);
883extern bool below_stbox_stbox(const STBox *box1, const STBox *box2);
884extern bool overbelow_stbox_stbox(const STBox *box1, const STBox *box2);
885extern bool above_stbox_stbox(const STBox *box1, const STBox *box2);
886extern bool overabove_stbox_stbox(const STBox *box1, const STBox *box2);
887extern bool front_stbox_stbox(const STBox *box1, const STBox *box2);
888extern bool overfront_stbox_stbox(const STBox *box1, const STBox *box2);
889extern bool back_stbox_stbox(const STBox *box1, const STBox *box2);
890extern bool overback_stbox_stbox(const STBox *box1, const STBox *box2);
891extern bool before_stbox_stbox(const STBox *box1, const STBox *box2);
892extern bool overbefore_stbox_stbox(const STBox *box1, const STBox *box2);
893extern bool after_stbox_stbox(const STBox *box1, const STBox *box2);
894extern bool overafter_stbox_stbox(const STBox *box1, const STBox *box2);
895
896/*****************************************************************************/
897
898/* Set functions for box types */
899
900extern TBox *union_tbox_tbox(const TBox *box1, const TBox *box2);
901extern bool inter_tbox_tbox(const TBox *box1, const TBox *box2, TBox *result);
902extern TBox *intersection_tbox_tbox(const TBox *box1, const TBox *box2);
903extern STBox *union_stbox_stbox(const STBox *box1, const STBox *box2, bool strict);
904extern bool inter_stbox_stbox(const STBox *box1, const STBox *box2, STBox *result);
905extern STBox *intersection_stbox_stbox(const STBox *box1, const STBox *box2);
906
907/*****************************************************************************/
908
909/* Comparison functions for box types */
910
911extern bool tbox_eq(const TBox *box1, const TBox *box2);
912extern bool tbox_ne(const TBox *box1, const TBox *box2);
913extern int tbox_cmp(const TBox *box1, const TBox *box2);
914extern bool tbox_lt(const TBox *box1, const TBox *box2);
915extern bool tbox_le(const TBox *box1, const TBox *box2);
916extern bool tbox_ge(const TBox *box1, const TBox *box2);
917extern bool tbox_gt(const TBox *box1, const TBox *box2);
918extern bool stbox_eq(const STBox *box1, const STBox *box2);
919extern bool stbox_ne(const STBox *box1, const STBox *box2);
920extern int stbox_cmp(const STBox *box1, const STBox *box2);
921extern bool stbox_lt(const STBox *box1, const STBox *box2);
922extern bool stbox_le(const STBox *box1, const STBox *box2);
923extern bool stbox_ge(const STBox *box1, const STBox *box2);
924extern bool stbox_gt(const STBox *box1, const STBox *box2);
925
926/*****************************************************************************
927 * Functions for temporal types
928 *****************************************************************************/
929
930/* Utility functions for temporal types */
931
932extern text *cstring2text(const char *cstring);
933extern char *text2cstring(const text *textptr);
934
935/* Input/output functions for temporal types */
936
937extern Temporal *tbool_in(const char *str);
938extern char *tbool_out(const Temporal *temp);
939extern char *temporal_as_hexwkb(const Temporal *temp, uint8_t variant, size_t *size_out);
940extern char *temporal_as_mfjson(const Temporal *temp, bool with_bbox, int flags, int precision, char *srs);
941extern uint8_t *temporal_as_wkb(const Temporal *temp, uint8_t variant, size_t *size_out);
942extern Temporal *temporal_from_hexwkb(const char *hexwkb);
943extern Temporal *temporal_from_mfjson(const char *mfjson);
944extern Temporal *temporal_from_wkb(const uint8_t *wkb, int size);
945extern Temporal *tfloat_in(const char *str);
946extern char *tfloat_out(const Temporal *temp, int maxdd);
947extern Temporal *tgeogpoint_in(const char *str);
948extern Temporal *tgeompoint_in(const char *str);
949extern Temporal *tint_in(const char *str);
950extern char *tint_out(const Temporal *temp);
951extern char *tpoint_as_ewkt(const Temporal *temp, int maxdd);
952extern char *tpoint_as_text(const Temporal *temp, int maxdd);
953extern char *tpoint_out(const Temporal *temp, int maxdd);
954extern Temporal *ttext_in(const char *str);
955extern char *ttext_out(const Temporal *temp);
956
957/*****************************************************************************/
958
959/* Constructor functions for temporal types */
960
961extern Temporal *tbool_from_base(bool b, const Temporal *temp);
962extern TInstant *tboolinst_make(bool b, TimestampTz t);
963extern TSequence *tbooldiscseq_from_base_time(bool b, const Set *ts);
964extern TSequence *tboolseq_from_base(bool b, const TSequence *seq);
965extern TSequence *tboolseq_from_base_time(bool b, const Span *p);
966extern TSequenceSet *tboolseqset_from_base(bool b, const TSequenceSet *ss);
967extern TSequenceSet *tboolseqset_from_base_time(bool b, const SpanSet *ps);
968extern Temporal *temporal_copy(const Temporal *temp);
969extern Temporal *tfloat_from_base(double d, const Temporal *temp, interpType interp);
970extern TInstant *tfloatinst_make(double d, TimestampTz t);
971extern TSequence *tfloatdiscseq_from_base_time(double d, const Set *ts);
972extern TSequence *tfloatseq_from_base(double d, const TSequence *seq, interpType interp);
973extern TSequence *tfloatseq_from_base_time(double d, const Span *p, interpType interp);
974extern TSequenceSet *tfloatseqset_from_base(double d, const TSequenceSet *ss, interpType interp);
975extern TSequenceSet *tfloatseqset_from_base_time(double d, const SpanSet *ps, interpType interp);
976extern Temporal *tgeogpoint_from_base(const GSERIALIZED *gs, const Temporal *temp, interpType interp);
978extern TSequence *tgeogpointdiscseq_from_base_time(const GSERIALIZED *gs, const Set *ts);
979extern TSequence *tgeogpointseq_from_base(const GSERIALIZED *gs, const TSequence *seq, interpType interp);
980extern TSequence *tgeogpointseq_from_base_time(const GSERIALIZED *gs, const Span *p, interpType interp);
983extern Temporal *tgeompoint_from_base(const GSERIALIZED *gs, const Temporal *temp, interpType interp);
985extern TSequence *tgeompointdiscseq_from_base_time(const GSERIALIZED *gs, const Set *ts);
986extern TSequence *tgeompointseq_from_base(const GSERIALIZED *gs, const TSequence *seq, interpType interp);
987extern TSequence *tgeompointseq_from_base_time(const GSERIALIZED *gs, const Span *p, interpType interp);
990extern Temporal *tint_from_base(int i, const Temporal *temp);
991extern TInstant *tintinst_make(int i, TimestampTz t);
992extern TSequence *tintdiscseq_from_base_time(int i, const Set *ts);
993extern TSequence *tintseq_from_base(int i, const TSequence *seq);
994extern TSequence *tintseq_from_base_time(int i, const Span *p);
995extern TSequenceSet *tintseqset_from_base(int i, const TSequenceSet *ss);
996extern TSequenceSet *tintseqset_from_base_time(int i, const SpanSet *ps);
997extern TSequence *tsequence_make(const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
998extern TSequence *tsequence_make_exp(const TInstant **instants, int count, int maxcount, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
999extern TSequence *tpointseq_make_coords(const double *xcoords, const double *ycoords, const double *zcoords,
1000 const TimestampTz *times, int count, int32 srid, bool geodetic, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
1001extern TSequence *tsequence_make_free(TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
1002extern TSequenceSet *tsequenceset_make(const TSequence **sequences, int count, bool normalize);
1003extern TSequenceSet *tsequenceset_make_exp(const TSequence **sequences, int count, int maxcount, bool normalize);
1004extern TSequenceSet *tsequenceset_make_free(TSequence **sequences, int count, bool normalize);
1005extern TSequenceSet *tsequenceset_make_gaps(const TInstant **instants, int count, interpType interp, float maxdist, Interval *maxt);
1006extern Temporal *ttext_from_base(const text *txt, const Temporal *temp);
1007extern TInstant *ttextinst_make(const text *txt, TimestampTz t);
1008extern TSequence *ttextdiscseq_from_base_time(const text *txt, const Set *ts);
1009extern TSequence *ttextseq_from_base(const text *txt, const TSequence *seq);
1010extern TSequence *ttextseq_from_base_time(const text *txt, const Span *p);
1011extern TSequenceSet *ttextseqset_from_base(const text *txt, const TSequenceSet *ss);
1012extern TSequenceSet *ttextseqset_from_base_time(const text *txt, const SpanSet *ps);
1013
1014/*****************************************************************************/
1015
1016/* Cast functions for temporal types */
1017
1018extern Temporal *tfloat_to_tint(const Temporal *temp);
1019extern Temporal *tint_to_tfloat(const Temporal *temp);
1020extern Span *tnumber_to_span(const Temporal *temp);
1021extern Span *temporal_to_period(const Temporal *temp);
1022
1023/*****************************************************************************/
1024
1025/* Accessor functions for temporal types */
1026
1027extern bool tbool_end_value(const Temporal *temp);
1028extern bool tbool_start_value(const Temporal *temp);
1029extern bool *tbool_values(const Temporal *temp, int *count);
1030extern Interval *temporal_duration(const Temporal *temp, bool boundspan);
1031extern const TInstant *temporal_end_instant(const Temporal *temp);
1032extern TSequence *temporal_end_sequence(const Temporal *temp);
1033extern TimestampTz temporal_end_timestamp(const Temporal *temp);
1034extern uint32 temporal_hash(const Temporal *temp);
1035extern const TInstant *temporal_instant_n(const Temporal *temp, int n);
1036extern const TInstant **temporal_instants(const Temporal *temp, int *count);
1037extern char *temporal_interpolation(const Temporal *temp);
1038extern const TInstant *temporal_max_instant(const Temporal *temp);
1039extern const TInstant *temporal_min_instant(const Temporal *temp);
1040extern int temporal_num_instants(const Temporal *temp);
1041extern int temporal_num_sequences(const Temporal *temp);
1042extern int temporal_num_timestamps(const Temporal *temp);
1043extern TSequence **temporal_segments(const Temporal *temp, int *count);
1044extern TSequence *temporal_sequence_n(const Temporal *temp, int i);
1045extern TSequence **temporal_sequences(const Temporal *temp, int *count);
1046extern size_t temporal_memory_size(const Temporal *temp);
1047extern const TInstant *temporal_start_instant(const Temporal *temp);
1048extern TSequence *temporal_start_sequence(const Temporal *temp);
1050extern char *temporal_subtype(const Temporal *temp);
1051extern SpanSet *temporal_time(const Temporal *temp);
1052extern bool temporal_timestamp_n(const Temporal *temp, int n, TimestampTz *result);
1053extern TimestampTz *temporal_timestamps(const Temporal *temp, int *count);
1054extern double tfloat_end_value(const Temporal *temp);
1055extern double tfloat_max_value(const Temporal *temp);
1056extern double tfloat_min_value(const Temporal *temp);
1057extern SpanSet *tfloat_spanset(const Temporal *temp);
1058extern double tfloat_start_value(const Temporal *temp);
1059extern double *tfloat_values(const Temporal *temp, int *count);
1060extern int tint_end_value(const Temporal *temp);
1061extern int tint_max_value(const Temporal *temp);
1062extern int tint_min_value(const Temporal *temp);
1063extern int tint_start_value(const Temporal *temp);
1064extern int *tint_values(const Temporal *temp, int *count);
1065extern GSERIALIZED *tpoint_end_value(const Temporal *temp);
1066extern GSERIALIZED *tpoint_start_value(const Temporal *temp);
1067extern GSERIALIZED **tpoint_values(const Temporal *temp, int *count);
1068extern text *ttext_end_value(const Temporal *temp);
1069extern text *ttext_max_value(const Temporal *temp);
1070extern text *ttext_min_value(const Temporal *temp);
1071extern text *ttext_start_value(const Temporal *temp);
1072extern text **ttext_values(const Temporal *temp, int *count);
1073
1074/*****************************************************************************/
1075
1076/* Transformation functions for temporal types */
1077
1078extern Temporal *temporal_append_tinstant(Temporal *temp, const TInstant *inst, bool expand);
1079extern Temporal *temporal_append_tsequence(Temporal *temp, const TSequence *seq, bool expand);
1080extern Temporal *temporal_merge(const Temporal *temp1, const Temporal *temp2);
1081extern Temporal *temporal_merge_array(Temporal **temparr, int count);
1082extern Temporal *temporal_shift(const Temporal *temp, const Interval *shift);
1083extern Temporal *temporal_shift_tscale(const Temporal *temp, const Interval *shift, const Interval *duration);
1084extern Temporal *temporal_step_to_linear(const Temporal *temp);
1085extern Temporal *temporal_to_tinstant(const Temporal *temp);
1086extern Temporal *temporal_to_tdiscseq(const Temporal *temp);
1087extern Temporal *temporal_to_tcontseq(const Temporal *temp);
1088extern Temporal *temporal_to_tsequenceset(const Temporal *temp);
1089extern Temporal *temporal_tscale(const Temporal *temp, const Interval *duration);
1090extern Temporal *temporal_tprecision(const Temporal *temp, const Interval *duration, TimestampTz origin);
1091extern Temporal *temporal_tsample(const Temporal *temp, const Interval *duration, TimestampTz origin);
1092
1093/*****************************************************************************/
1094
1095/* Restriction functions for temporal types */
1096
1097extern Temporal *tbool_at_value(const Temporal *temp, bool b);
1098extern Temporal *tbool_minus_value(const Temporal *temp, bool b);
1099extern bool tbool_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, bool *value);
1100extern Temporal *temporal_at_max(const Temporal *temp);
1101extern Temporal *temporal_at_min(const Temporal *temp);
1102extern Temporal *temporal_at_period(const Temporal *temp, const Span *p);
1103extern Temporal *temporal_at_periodset(const Temporal *temp, const SpanSet *ps);
1104extern Temporal *temporal_at_timestamp(const Temporal *temp, TimestampTz t);
1105extern Temporal *temporal_at_timestampset(const Temporal *temp, const Set *ts);
1106extern Temporal *temporal_minus_max(const Temporal *temp);
1107extern Temporal *temporal_minus_min(const Temporal *temp);
1108extern Temporal *temporal_minus_period(const Temporal *temp, const Span *p);
1109extern Temporal *temporal_minus_periodset(const Temporal *temp, const SpanSet *ps);
1111extern Temporal *temporal_minus_timestampset(const Temporal *temp, const Set *ts);
1112extern Temporal *tfloat_at_value(const Temporal *temp, double d);
1113extern Temporal *tfloat_at_values(const Temporal *temp, const Set *set);
1114extern Temporal *tfloat_minus_value(const Temporal *temp, double d);
1115extern Temporal *tfloat_minus_values(const Temporal *temp, const Set *set);
1116extern bool tfloat_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, double *value);
1117extern Temporal *tint_at_value(const Temporal *temp, int i);
1118extern Temporal *tint_at_values(const Temporal *temp, const Set *set);
1119extern Temporal *tint_minus_value(const Temporal *temp, int i);
1120extern Temporal *tint_minus_values(const Temporal *temp, const Set *set);
1121extern bool tint_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, int *value);
1122extern Temporal *tnumber_at_span(const Temporal *temp, const Span *span);
1123extern Temporal *tnumber_at_spanset(const Temporal *temp, const SpanSet *ss);
1124extern Temporal *tnumber_at_tbox(const Temporal *temp, const TBox *box);
1125extern Temporal *tnumber_minus_span(const Temporal *temp, const Span *span);
1126extern Temporal *tnumber_minus_spanset(const Temporal *temp, const SpanSet *ss);
1127extern Temporal *tnumber_minus_tbox(const Temporal *temp, const TBox *box);
1128extern Temporal *tpoint_at_geometry(const Temporal *temp, const GSERIALIZED *gs);
1129extern Temporal *tpoint_at_stbox(const Temporal *temp, const STBox *box);
1130extern Temporal *tpoint_at_value(const Temporal *temp, GSERIALIZED *gs);
1131extern Temporal *tpoint_at_values(const Temporal *temp, const Set *set);
1132extern Temporal *tpoint_minus_geometry(const Temporal *temp, const GSERIALIZED *gs);
1133extern Temporal *tpoint_minus_stbox(const Temporal *temp, const STBox *box);
1134extern Temporal *tpoint_minus_value(const Temporal *temp, GSERIALIZED *gs);
1135extern Temporal *tpoint_minus_values(const Temporal *temp, const Set *set);
1136extern bool tpoint_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, GSERIALIZED **value);
1137extern TSequence *tsequence_at_period(const TSequence *seq, const Span *p);
1138extern Temporal *ttext_at_value(const Temporal *temp, text *txt);
1139extern Temporal *ttext_at_values(const Temporal *temp, const Set *set);
1140extern Temporal *ttext_minus_value(const Temporal *temp, text *txt);
1141extern Temporal *ttext_minus_values(const Temporal *temp, const Set *set);
1142extern bool ttext_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, text **value);
1143
1144/*****************************************************************************/
1145
1146/* Boolean functions for temporal types */
1147
1148extern Temporal *tand_bool_tbool(bool b, const Temporal *temp);
1149extern Temporal *tand_tbool_bool(const Temporal *temp, bool b);
1150extern Temporal *tand_tbool_tbool(const Temporal *temp1, const Temporal *temp2);
1151extern Temporal *tnot_tbool(const Temporal *temp);
1152extern Temporal *tor_bool_tbool(bool b, const Temporal *temp);
1153extern Temporal *tor_tbool_bool(const Temporal *temp, bool b);
1154extern Temporal *tor_tbool_tbool(const Temporal *temp1, const Temporal *temp2);
1155extern SpanSet *tbool_when_true(const Temporal *temp);
1156
1157/*****************************************************************************/
1158
1159/* Mathematical functions for temporal types */
1160
1161extern Temporal *add_float_tfloat(double d, const Temporal *tnumber);
1162extern Temporal *add_int_tint(int i, const Temporal *tnumber);
1163extern Temporal *add_tfloat_float(const Temporal *tnumber, double d);
1164extern Temporal *add_tint_int(const Temporal *tnumber, int i);
1165extern Temporal *add_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1166extern Temporal *div_float_tfloat(double d, const Temporal *tnumber);
1167extern Temporal *div_int_tint(int i, const Temporal *tnumber);
1168extern Temporal *div_tfloat_float(const Temporal *tnumber, double d);
1169extern Temporal *div_tint_int(const Temporal *tnumber, int i);
1170extern Temporal *div_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1171extern Temporal *mult_float_tfloat(double d, const Temporal *tnumber);
1172extern Temporal *mult_int_tint(int i, const Temporal *tnumber);
1173extern Temporal *mult_tfloat_float(const Temporal *tnumber, double d);
1174extern Temporal *mult_tint_int(const Temporal *tnumber, int i);
1175extern Temporal *mult_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1176extern Temporal *sub_float_tfloat(double d, const Temporal *tnumber);
1177extern Temporal *sub_int_tint(int i, const Temporal *tnumber);
1178extern Temporal *sub_tfloat_float(const Temporal *tnumber, double d);
1179extern Temporal *sub_tint_int(const Temporal *tnumber, int i);
1180extern Temporal *sub_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1181extern Temporal *tfloat_degrees(const Temporal *temp);
1182extern Temporal *tfloat_radians(const Temporal *temp);
1183extern Temporal *tfloat_derivative(const Temporal *temp);
1184extern Temporal *tnumber_abs(const Temporal *temp);
1185
1186/*****************************************************************************/
1187
1188/* Text functions for temporal types */
1189
1190extern Temporal *textcat_text_ttext(const text *txt, const Temporal *temp);
1191extern Temporal *textcat_ttext_text(const Temporal *temp, const text *txt);
1192extern Temporal *textcat_ttext_ttext(const Temporal *temp1, const Temporal *temp2);
1193extern Temporal *ttext_upper(const Temporal *temp);
1194extern Temporal *ttext_lower(const Temporal *temp);
1195
1196/*****************************************************************************
1197 * Bounding box functions for temporal types
1198 *****************************************************************************/
1199
1200/* Topological functions for temporal types */
1201
1202extern bool adjacent_float_tfloat(double d, const Temporal *tnumber);
1203extern bool adjacent_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1204extern bool adjacent_int_tint(int i, const Temporal *tnumber);
1205extern bool adjacent_period_temporal(const Span *p, const Temporal *temp);
1206extern bool adjacent_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1207extern bool adjacent_span_tnumber(const Span *span, const Temporal *tnumber);
1208extern bool adjacent_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1209extern bool adjacent_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1210extern bool adjacent_temporal_period(const Temporal *temp, const Span *p);
1211extern bool adjacent_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1212extern bool adjacent_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1214extern bool adjacent_temporal_timestampset(const Temporal *temp, const Set *ts);
1215extern bool adjacent_tfloat_float(const Temporal *tnumber, double d);
1217extern bool adjacent_timestampset_temporal(const Set *ts, const Temporal *temp);
1218extern bool adjacent_tint_int(const Temporal *tnumber, int i);
1219extern bool adjacent_tnumber_span(const Temporal *tnumber, const Span *span);
1220extern bool adjacent_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1221extern bool adjacent_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1222extern bool adjacent_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1223extern bool adjacent_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1224extern bool adjacent_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1225extern bool contained_float_tfloat(double d, const Temporal *tnumber);
1226extern bool contained_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1227extern bool contained_int_tint(int i, const Temporal *tnumber);
1228extern bool contained_period_temporal(const Span *p, const Temporal *temp);
1229extern bool contained_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1230extern bool contained_span_tnumber(const Span *span, const Temporal *tnumber);
1231extern bool contained_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1232extern bool contained_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1233extern bool contained_temporal_period(const Temporal *temp, const Span *p);
1234extern bool contained_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1235extern bool contained_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1237extern bool contained_temporal_timestampset(const Temporal *temp, const Set *ts);
1238extern bool contained_tfloat_float(const Temporal *tnumber, double d);
1240extern bool contained_timestampset_temporal(const Set *ts, const Temporal *temp);
1241extern bool contained_tint_int(const Temporal *tnumber, int i);
1242extern bool contained_tnumber_span(const Temporal *tnumber, const Span *span);
1243extern bool contained_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1244extern bool contained_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1245extern bool contained_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1246extern bool contained_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1247extern bool contained_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1248extern bool contains_bbox_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1249extern bool contains_float_tfloat(double d, const Temporal *tnumber);
1250extern bool contains_int_tint(int i, const Temporal *tnumber);
1251extern bool contains_period_temporal(const Span *p, const Temporal *temp);
1252extern bool contains_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1253extern bool contains_span_tnumber(const Span *span, const Temporal *tnumber);
1254extern bool contains_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1255extern bool contains_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1256extern bool contains_temporal_period(const Temporal *temp, const Span *p);
1257extern bool contains_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1258extern bool contains_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1260extern bool contains_temporal_timestampset(const Temporal *temp, const Set *ts);
1261extern bool contains_tfloat_float(const Temporal *tnumber, double d);
1263extern bool contains_timestampset_temporal(const Set *ts, const Temporal *temp);
1264extern bool contains_tint_int(const Temporal *tnumber, int i);
1265extern bool contains_tnumber_span(const Temporal *tnumber, const Span *span);
1266extern bool contains_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1267extern bool contains_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1268extern bool contains_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1269extern bool contains_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1270extern bool contains_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1271extern bool left_float_tfloat(double d, const Temporal *tnumber);
1272extern bool left_int_tint(int i, const Temporal *tnumber);
1273extern bool left_tfloat_float(const Temporal *tnumber, double d);
1274extern bool left_tint_int(const Temporal *tnumber, int i);
1275extern bool overlaps_float_tfloat(double d, const Temporal *tnumber);
1276extern bool overlaps_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1277extern bool overlaps_int_tint(int i, const Temporal *tnumber);
1278extern bool overlaps_span_tnumber(const Span *span, const Temporal *tnumber);
1279extern bool overlaps_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1280extern bool overlaps_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1281extern bool overlaps_temporal_period(const Temporal *temp, const Span *p);
1282extern bool overlaps_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1283extern bool overlaps_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1285extern bool overlaps_temporal_timestampset(const Temporal *temp, const Set *ts);
1286extern bool overlaps_tfloat_float(const Temporal *tnumber, double d);
1287extern bool overlaps_tint_int(const Temporal *tnumber, int i);
1288extern bool overlaps_tnumber_span(const Temporal *tnumber, const Span *span);
1289extern bool overlaps_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1290extern bool overlaps_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1291extern bool overlaps_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1292extern bool overlaps_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1293extern bool overlaps_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1294extern bool overleft_float_tfloat(double d, const Temporal *tnumber);
1295extern bool overleft_int_tint(int i, const Temporal *tnumber);
1296extern bool overleft_tfloat_float(const Temporal *tnumber, double d);
1297extern bool overleft_tint_int(const Temporal *tnumber, int i);
1298extern bool overright_float_tfloat(double d, const Temporal *tnumber);
1299extern bool overright_int_tint(int i, const Temporal *tnumber);
1300extern bool overright_tfloat_float(const Temporal *tnumber, double d);
1301extern bool overright_tint_int(const Temporal *tnumber, int i);
1302extern bool right_float_tfloat(double d, const Temporal *tnumber);
1303extern bool right_int_tint(int i, const Temporal *tnumber);
1304extern bool right_tfloat_float(const Temporal *tnumber, double d);
1305extern bool right_tint_int(const Temporal *tnumber, int i);
1306extern bool same_float_tfloat(double d, const Temporal *tnumber);
1307extern bool same_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1308extern bool same_int_tint(int i, const Temporal *tnumber);
1309extern bool same_period_temporal(const Span *p, const Temporal *temp);
1310extern bool same_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1311extern bool same_span_tnumber(const Span *span, const Temporal *tnumber);
1312extern bool same_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1313extern bool same_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1314extern bool same_temporal_period(const Temporal *temp, const Span *p);
1315extern bool same_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1316extern bool same_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1318extern bool same_temporal_timestampset(const Temporal *temp, const Set *ts);
1319extern bool same_tfloat_float(const Temporal *tnumber, double d);
1321extern bool same_timestampset_temporal(const Set *ts, const Temporal *temp);
1322extern bool same_tint_int(const Temporal *tnumber, int i);
1323extern bool same_tnumber_span(const Temporal *tnumber, const Span *span);
1324extern bool same_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1325extern bool same_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1326extern bool same_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1327extern bool same_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1328extern bool same_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1329
1330/*****************************************************************************/
1331
1332/* Position functions for temporal types */
1333
1334extern bool above_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1335extern bool above_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1336extern bool above_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1337extern bool above_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1338extern bool above_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1339extern bool after_period_temporal(const Span *p, const Temporal *temp);
1340extern bool after_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1341extern bool after_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1342extern bool after_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1343extern bool after_temporal_period(const Temporal *temp, const Span *p);
1344extern bool after_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1345extern bool after_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1347extern bool after_temporal_timestampset(const Temporal *temp, const Set *ts);
1349extern bool after_timestampset_temporal(const Set *ts, const Temporal *temp);
1350extern bool after_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1351extern bool after_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1352extern bool after_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1353extern bool after_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1354extern bool back_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1355extern bool back_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1356extern bool back_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1357extern bool back_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1358extern bool back_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1359extern bool before_period_temporal(const Span *p, const Temporal *temp);
1360extern bool before_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1361extern bool before_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1362extern bool before_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1363extern bool before_temporal_period(const Temporal *temp, const Span *p);
1364extern bool before_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1365extern bool before_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1367extern bool before_temporal_timestampset(const Temporal *temp, const Set *ts);
1369extern bool before_timestampset_temporal(const Set *ts, const Temporal *temp);
1370extern bool before_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1371extern bool before_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1372extern bool before_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1373extern bool before_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1374extern bool below_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1375extern bool below_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1376extern bool below_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1377extern bool below_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1378extern bool below_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1379extern bool front_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1380extern bool front_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1381extern bool front_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1382extern bool front_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1383extern bool front_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1384extern bool left_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1385extern bool left_span_tnumber(const Span *span, const Temporal *tnumber);
1386extern bool left_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1387extern bool left_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1388extern bool left_tnumber_span(const Temporal *tnumber, const Span *span);
1389extern bool left_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1390extern bool left_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1391extern bool left_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1392extern bool left_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1393extern bool left_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1394extern bool overabove_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1395extern bool overabove_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1396extern bool overabove_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1397extern bool overabove_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1398extern bool overabove_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1399extern bool overafter_period_temporal(const Span *p, const Temporal *temp);
1400extern bool overafter_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1401extern bool overafter_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1402extern bool overafter_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1403extern bool overafter_temporal_period(const Temporal *temp, const Span *p);
1404extern bool overafter_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1405extern bool overafter_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1407extern bool overafter_temporal_timestampset(const Temporal *temp, const Set *ts);
1409extern bool overafter_timestampset_temporal(const Set *ts, const Temporal *temp);
1410extern bool overafter_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1411extern bool overafter_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1412extern bool overafter_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1413extern bool overafter_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1414extern bool overback_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1415extern bool overback_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1416extern bool overback_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1417extern bool overback_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1418extern bool overback_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1419extern bool overbefore_period_temporal(const Span *p, const Temporal *temp);
1420extern bool overbefore_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1421extern bool overbefore_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1422extern bool overbefore_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1423extern bool overbefore_temporal_period(const Temporal *temp, const Span *p);
1424extern bool overbefore_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1425extern bool overbefore_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1427extern bool overbefore_temporal_timestampset(const Temporal *temp, const Set *ts);
1429extern bool overbefore_timestampset_temporal(const Set *ts, const Temporal *temp);
1430extern bool overbefore_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1431extern bool overbefore_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1432extern bool overbefore_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1433extern bool overbefore_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1434extern bool overbelow_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1435extern bool overbelow_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1436extern bool overbelow_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1437extern bool overbelow_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1438extern bool overbelow_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1439extern bool overfront_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1440extern bool overfront_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1441extern bool overfront_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1442extern bool overfront_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1443extern bool overfront_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1444extern bool overleft_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1445extern bool overleft_span_tnumber(const Span *span, const Temporal *tnumber);
1446extern bool overleft_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1447extern bool overleft_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1448extern bool overleft_tnumber_span(const Temporal *tnumber, const Span *span);
1449extern bool overleft_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1450extern bool overleft_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1451extern bool overleft_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1452extern bool overleft_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1453extern bool overleft_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1454extern bool overright_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1455extern bool overright_span_tnumber(const Span *span, const Temporal *tnumber);
1456extern bool overright_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1457extern bool overright_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1458extern bool overright_tnumber_span(const Temporal *tnumber, const Span *span);
1459extern bool overright_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1460extern bool overright_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1461extern bool overright_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1462extern bool overright_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1463extern bool overright_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1464extern bool right_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1465extern bool right_span_tnumber(const Span *span, const Temporal *tnumber);
1466extern bool right_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1467extern bool right_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1468extern bool right_tnumber_span(const Temporal *tnumber, const Span *span);
1469extern bool right_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1470extern bool right_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1471extern bool right_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1472extern bool right_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1473extern bool right_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1474
1475/*****************************************************************************/
1476
1477/* Distance functions for temporal types */
1478
1479extern Temporal *distance_tfloat_float(const Temporal *temp, double d);
1480extern Temporal *distance_tint_int(const Temporal *temp, int i);
1481extern Temporal *distance_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1482extern Temporal *distance_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo);
1483extern Temporal *distance_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1484extern double nad_stbox_geo(const STBox *box, const GSERIALIZED *gs);
1485extern double nad_stbox_stbox(const STBox *box1, const STBox *box2);
1486extern double nad_tbox_tbox(const TBox *box1, const TBox *box2);
1487extern double nad_tfloat_float(const Temporal *temp, double d);
1488extern double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2);
1489extern int nad_tint_int(const Temporal *temp, int i);
1490extern int nad_tint_tint(const Temporal *temp1, const Temporal *temp2);
1491extern double nad_tnumber_tbox(const Temporal *temp, const TBox *box);
1492extern double nad_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1493extern double nad_tpoint_stbox(const Temporal *temp, const STBox *box);
1494extern double nad_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1495extern TInstant *nai_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1496extern TInstant *nai_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1497extern bool shortestline_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, GSERIALIZED **result);
1498extern bool shortestline_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, GSERIALIZED **result);
1499
1500/*****************************************************************************/
1501
1502/* Ever/always functions for temporal types */
1503
1504extern bool tbool_always_eq(const Temporal *temp, bool b);
1505extern bool tbool_ever_eq(const Temporal *temp, bool b);
1506extern bool tfloat_always_eq(const Temporal *temp, double d);
1507extern bool tfloat_always_le(const Temporal *temp, double d);
1508extern bool tfloat_always_lt(const Temporal *temp, double d);
1509extern bool tfloat_ever_eq(const Temporal *temp, double d);
1510extern bool tfloat_ever_le(const Temporal *temp, double d);
1511extern bool tfloat_ever_lt(const Temporal *temp, double d);
1512extern bool tgeogpoint_always_eq(const Temporal *temp, GSERIALIZED *gs);;
1513extern bool tgeogpoint_ever_eq(const Temporal *temp, GSERIALIZED *gs);;
1514extern bool tgeompoint_always_eq(const Temporal *temp, GSERIALIZED *gs);
1515extern bool tgeompoint_ever_eq(const Temporal *temp, GSERIALIZED *gs);;
1516extern bool tint_always_eq(const Temporal *temp, int i);
1517extern bool tint_always_le(const Temporal *temp, int i);
1518extern bool tint_always_lt(const Temporal *temp, int i);
1519extern bool tint_ever_eq(const Temporal *temp, int i);
1520extern bool tint_ever_le(const Temporal *temp, int i);
1521extern bool tint_ever_lt(const Temporal *temp, int i);
1522extern bool ttext_always_eq(const Temporal *temp, text *txt);
1523extern bool ttext_always_le(const Temporal *temp, text *txt);
1524extern bool ttext_always_lt(const Temporal *temp, text *txt);
1525extern bool ttext_ever_eq(const Temporal *temp, text *txt);
1526extern bool ttext_ever_le(const Temporal *temp, text *txt);
1527extern bool ttext_ever_lt(const Temporal *temp, text *txt);
1528
1529/*****************************************************************************/
1530
1531/* Comparison functions for temporal types */
1532
1533extern int temporal_cmp(const Temporal *temp1, const Temporal *temp2);
1534extern bool temporal_eq(const Temporal *temp1, const Temporal *temp2);
1535extern bool temporal_ge(const Temporal *temp1, const Temporal *temp2);
1536extern bool temporal_gt(const Temporal *temp1, const Temporal *temp2);
1537extern bool temporal_le(const Temporal *temp1, const Temporal *temp2);
1538extern bool temporal_lt(const Temporal *temp1, const Temporal *temp2);
1539extern bool temporal_ne(const Temporal *temp1, const Temporal *temp2);
1540extern Temporal *teq_bool_tbool(bool b, const Temporal *temp);
1541extern Temporal *teq_float_tfloat(double d, const Temporal *temp);
1542extern Temporal *teq_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1543extern Temporal *teq_int_tint(int i, const Temporal *temp);
1544extern Temporal *teq_point_tgeogpoint(const GSERIALIZED *gs, const Temporal *temp);
1545extern Temporal *teq_point_tgeompoint(const GSERIALIZED *gs, const Temporal *temp);
1546extern Temporal *teq_tbool_bool(const Temporal *temp, bool b);
1547extern Temporal *teq_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1548extern Temporal *teq_text_ttext(const text *txt, const Temporal *temp);
1549extern Temporal *teq_tfloat_float(const Temporal *temp, double d);
1550extern Temporal *teq_tgeogpoint_point(const Temporal *temp, const GSERIALIZED *gs);
1551extern Temporal *teq_tgeompoint_point(const Temporal *temp, const GSERIALIZED *gs);
1552extern Temporal *teq_tint_int(const Temporal *temp, int i);
1553extern Temporal *teq_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1554extern Temporal *teq_ttext_text(const Temporal *temp, const text *txt);
1555extern Temporal *tge_float_tfloat(double d, const Temporal *temp);
1556extern Temporal *tge_int_tint(int i, const Temporal *temp);
1557extern Temporal *tge_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1558extern Temporal *tge_text_ttext(const text *txt, const Temporal *temp);
1559extern Temporal *tge_tfloat_float(const Temporal *temp, double d);
1560extern Temporal *tge_tint_int(const Temporal *temp, int i);
1561extern Temporal *tge_ttext_text(const Temporal *temp, const text *txt);
1562extern Temporal *tgt_float_tfloat(double d, const Temporal *temp);
1563extern Temporal *tgt_int_tint(int i, const Temporal *temp);
1564extern Temporal *tgt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1565extern Temporal *tgt_text_ttext(const text *txt, const Temporal *temp);
1566extern Temporal *tgt_tfloat_float(const Temporal *temp, double d);
1567extern Temporal *tgt_tint_int(const Temporal *temp, int i);
1568extern Temporal *tgt_ttext_text(const Temporal *temp, const text *txt);
1569extern Temporal *tle_float_tfloat(double d, const Temporal *temp);
1570extern Temporal *tle_int_tint(int i, const Temporal *temp);
1571extern Temporal *tle_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1572extern Temporal *tle_text_ttext(const text *txt, const Temporal *temp);
1573extern Temporal *tle_tfloat_float(const Temporal *temp, double d);
1574extern Temporal *tle_tint_int(const Temporal *temp, int i);
1575extern Temporal *tle_ttext_text(const Temporal *temp, const text *txt);
1576extern Temporal *tlt_float_tfloat(double d, const Temporal *temp);
1577extern Temporal *tlt_int_tint(int i, const Temporal *temp);
1578extern Temporal *tlt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1579extern Temporal *tlt_text_ttext(const text *txt, const Temporal *temp);
1580extern Temporal *tlt_tfloat_float(const Temporal *temp, double d);
1581extern Temporal *tlt_tint_int(const Temporal *temp, int i);
1582extern Temporal *tlt_ttext_text(const Temporal *temp, const text *txt);
1583extern Temporal *tne_bool_tbool(bool b, const Temporal *temp);
1584extern Temporal *tne_float_tfloat(double d, const Temporal *temp);
1585extern Temporal *tne_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1586extern Temporal *tne_int_tint(int i, const Temporal *temp);
1587extern Temporal *tne_point_tgeogpoint(const GSERIALIZED *gs, const Temporal *temp);
1588extern Temporal *tne_point_tgeompoint(const GSERIALIZED *gs, const Temporal *temp);
1589extern Temporal *tne_tbool_bool(const Temporal *temp, bool b);
1590extern Temporal *tne_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1591extern Temporal *tne_text_ttext(const text *txt, const Temporal *temp);
1592extern Temporal *tne_tfloat_float(const Temporal *temp, double d);
1593extern Temporal *tne_tgeogpoint_point(const Temporal *temp, const GSERIALIZED *gs);
1594extern Temporal *tne_tgeompoint_point(const Temporal *temp, const GSERIALIZED *gs);
1595extern Temporal *tne_tint_int(const Temporal *temp, int i);
1596extern Temporal *tne_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1597extern Temporal *tne_ttext_text(const Temporal *temp, const text *txt);
1598
1599/*****************************************************************************
1600 Spatial functions for temporal point types
1601 *****************************************************************************/
1602
1603/* Spatial accessor functions for temporal point types */
1604
1605extern bool bearing_point_point(const GSERIALIZED *geo1, const GSERIALIZED *geo2, double *result);
1606extern Temporal *bearing_tpoint_point(const Temporal *temp, const GSERIALIZED *gs, bool invert);
1607extern Temporal *bearing_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1608extern Temporal *tpoint_azimuth(const Temporal *temp);
1609extern Temporal *tpoint_cumulative_length(const Temporal *temp);
1610extern Temporal *tpoint_get_coord(const Temporal *temp, int coord);
1611extern bool tpoint_is_simple(const Temporal *temp);
1612extern double tpoint_length(const Temporal *temp);
1613extern Temporal *tpoint_speed(const Temporal *temp);
1614extern int tpoint_srid(const Temporal *temp);
1615extern STBox *tpoint_stboxes(const Temporal *temp, int *count);
1616extern GSERIALIZED *tpoint_trajectory(const Temporal *temp);
1617
1618/*****************************************************************************/
1619
1620/* Spatial transformation functions for temporal point types */
1621
1622extern STBox *geo_expand_space(const GSERIALIZED *gs, double d);
1623extern Temporal *tgeompoint_tgeogpoint(const Temporal *temp, bool oper);
1624extern STBox *tpoint_expand_space(const Temporal *temp, double d);
1625extern Temporal **tpoint_make_simple(const Temporal *temp, int *count);
1626extern Temporal *tpoint_set_srid(const Temporal *temp, int32 srid);
1627
1628/*****************************************************************************/
1629
1630/* Spatial relationship functions for temporal point types */
1631
1632extern int econtains_geo_tpoint(const GSERIALIZED *geo, const Temporal *temp);
1633extern int edisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1634extern int edisjoint_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1635extern int edwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist);
1636extern int edwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist);
1637extern int eintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1638extern int eintersects_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1639extern int etouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1640extern Temporal *tcontains_geo_tpoint(const GSERIALIZED *gs, const Temporal *temp, bool restr, bool atvalue);
1641extern Temporal *tdisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo, bool restr, bool atvalue);
1642extern Temporal *tdwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist, bool restr, bool atvalue);
1643extern Temporal *tdwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist, bool restr, bool atvalue);
1644extern Temporal *tintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo, bool restr, bool atvalue);
1645extern Temporal *ttouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, bool restr, bool atvalue);
1646
1647/*****************************************************************************/
1648
1649/* Modification functions for temporal types */
1650
1651extern Temporal *temporal_insert(const Temporal *temp1, const Temporal *temp2, bool connect);
1652extern Temporal *temporal_update(const Temporal *temp1, const Temporal *temp2, bool connect);
1653extern Temporal *temporal_delete_timestamp(const Temporal *temp, TimestampTz t, bool connect);
1654extern Temporal *temporal_delete_timestampset(const Temporal *temp, const Set *ts, bool connect);
1655extern Temporal *temporal_delete_period(const Temporal *temp, const Span *p, bool connect);
1656extern Temporal *temporal_delete_periodset(const Temporal *temp, const SpanSet *ps, bool connect);
1657
1658/*****************************************************************************/
1659
1660/* Local and temporal aggregate functions for temporal types */
1661
1662extern SkipList *tbool_tand_transfn(SkipList *state, const Temporal *temp);
1663extern SkipList *tbool_tor_transfn(SkipList *state, const Temporal *temp);
1664extern Span *temporal_extent_transfn(Span *p, const Temporal *temp);
1667extern SkipList *tfloat_tmax_transfn(SkipList *state, const Temporal *temp);
1668extern SkipList *tfloat_tmin_transfn(SkipList *state, const Temporal *temp);
1669extern SkipList *tfloat_tsum_transfn(SkipList *state, const Temporal *temp);
1670extern SkipList *tint_tmax_transfn(SkipList *state, const Temporal *temp);
1671extern SkipList *tint_tmin_transfn(SkipList *state, const Temporal *temp);
1672extern SkipList *tint_tsum_transfn(SkipList *state, const Temporal *temp);
1673extern double tnumber_integral(const Temporal *temp);
1674extern TBox *tnumber_extent_transfn(TBox *box, const Temporal *temp);
1676extern SkipList *tnumber_tavg_transfn(SkipList *state, const Temporal *temp);
1677extern double tnumber_twavg(const Temporal *temp);
1678extern STBox *tpoint_extent_transfn(STBox *box, const Temporal *temp);
1679extern GSERIALIZED *tpoint_twcentroid(const Temporal *temp);
1680extern SkipList *ttext_tmax_transfn(SkipList *state, const Temporal *temp);
1681extern SkipList *ttext_tmin_transfn(SkipList *state, const Temporal *temp);
1682
1683/*****************************************************************************/
1684
1685/* Tile functions for temporal types */
1686
1687extern int int_bucket(int value, int size, int origin);
1688extern double float_bucket(double value, double size, double origin);
1689extern TimestampTz timestamptz_bucket(TimestampTz timestamp, const Interval *duration, TimestampTz origin);
1690
1691extern Span *intspan_bucket_list(const Span *bounds, int size, int origin, int *newcount);
1692extern Span *floatspan_bucket_list(const Span *bounds, double size, double origin, int *newcount);
1693extern Span *period_bucket_list(const Span *bounds, const Interval *duration, TimestampTz origin, int *newcount);
1694
1695extern TBox *tbox_tile_list(const TBox *bounds, double xsize, const Interval *duration, double xorigin, TimestampTz torigin, int *rows, int *columns);
1696
1697extern Temporal **tint_value_split(Temporal *temp, int size, int origin, int *newcount);
1698extern Temporal **tfloat_value_split(Temporal *temp, double size, double origin, int *newcount);
1699extern Temporal **temporal_time_split(Temporal *temp, Interval *duration, TimestampTz torigin, int *newcount);
1700extern Temporal **tint_value_time_split(Temporal *temp, int size, int vorigin, Interval *duration, TimestampTz torigin, int *newcount);
1701extern Temporal **tfloat_value_time_split(Temporal *temp, double size, double vorigin, Interval *duration, TimestampTz torigin, int *newcount);
1702
1703extern STBox *stbox_tile_list(STBox *bounds, double size, const Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, int **cellcount);
1704
1705/*****************************************************************************/
1706
1707/* Similarity functions for temporal types */
1708
1709extern double temporal_frechet_distance(const Temporal *temp1, const Temporal *temp2);
1710extern double temporal_dyntimewarp_distance(const Temporal *temp1, const Temporal *temp2);
1711extern Match *temporal_frechet_path(const Temporal *temp1, const Temporal *temp2, int *count);
1712extern Match *temporal_dyntimewarp_path(const Temporal *temp1, const Temporal *temp2, int *count);
1713
1714/*****************************************************************************/
1715
1716/* Analytics functions for temporal types */
1717
1719Temporal *temporal_simplify(const Temporal *temp, double eps_dist, bool synchronized);
1720bool tpoint_AsMVTGeom(const Temporal *temp, const STBox *bounds, int32_t extent,
1721 int32_t buffer, bool clip_geom, GSERIALIZED **geom, int64 **timesarr, int *count);
1722bool tpoint_to_geo_measure(const Temporal *tpoint, const Temporal *measure, bool segmentize, GSERIALIZED **result);
1723
1724/*****************************************************************************/
1725
1726#endif
const char *const months[]
Definition: datetime.c:54
const char *const days[]
Definition: datetime.c:57
bool tbox_tmin(const TBox *box, TimestampTz *result)
Return true if the temporal box has time dimension.
Definition: tbox.c:707
bool stbox_xmax(const STBox *box, double *result)
Return true if the spatiotemporal box has value dimension.
Definition: stbox.c:762
bool stbox_hasz(const STBox *box)
Return true if a spatiotemporal box has Z dimension.
Definition: stbox.c:701
bool stbox_zmax(const STBox *box, double *result)
Return true if the spatiotemporal box has Z dimension.
Definition: stbox.c:838
bool stbox_xmin(const STBox *box, double *result)
Return true if the spatiotemporal box has value dimension.
Definition: stbox.c:743
bool stbox_hast(const STBox *box)
Return true if a spatiotemporal box has time dimension.
Definition: stbox.c:713
int32 stbox_srid(const STBox *box)
Return the SRID of a spatiotemporal box.
Definition: stbox.c:895
bool tbox_xmax(const TBox *box, double *result)
Return true if the temporal box has value dimension.
Definition: tbox.c:688
bool tbox_xmin(const TBox *box, double *result)
Return true if the temporal box has value dimension.
Definition: tbox.c:669
bool stbox_ymin(const STBox *box, double *result)
Return true if the spatiotemporal box has value dimension.
Definition: stbox.c:781
bool stbox_ymax(const STBox *box, double *result)
Return true if the spatiotemporal box has value dimension.
Definition: stbox.c:800
bool stbox_isgeodetic(const STBox *box)
Return true if a spatiotemporal box is geodetic.
Definition: stbox.c:726
bool tbox_tmax(const TBox *box, TimestampTz *result)
Return true if the temporal box has time dimension.
Definition: tbox.c:726
bool tbox_hasx(const TBox *box)
Return true if a temporal box has value dimension.
Definition: tbox.c:640
bool tbox_hast(const TBox *box)
Return true if a temporal box has time dimension.
Definition: tbox.c:652
bool stbox_tmax(const STBox *box, TimestampTz *result)
Return true if the spatiotemporal box has time dimension.
Definition: stbox.c:876
bool stbox_zmin(const STBox *box, double *result)
Return true if the spatiotemporal box has Z dimension.
Definition: stbox.c:819
bool stbox_tmin(const STBox *box, TimestampTz *result)
Return true if the spatiotemporal box has time dimension.
Definition: stbox.c:857
bool stbox_hasx(const STBox *box)
Return true if a spatiotemporal box has value dimension.
Definition: stbox.c:689
TBox * float_period_to_tbox(double d, const Span *p)
Return a temporal box from a float and a period.
Definition: tbox.c:556
TBox * periodset_to_tbox(const SpanSet *ps)
Cast a period set to a temporal box.
Definition: tbox.c:459
TBox * int_to_tbox(int i)
Cast an integer to a temporal box.
Definition: tbox.c:236
TBox * timestamp_to_tbox(TimestampTz t)
Cast a timestamp to a temporal box.
Definition: tbox.c:298
STBox * tpoint_to_stbox(const Temporal *temp)
Return the bounding box of a temporal point.
Definition: tpoint.c:73
TBox * tnumber_to_tbox(const Temporal *temp)
Return the bounding box of a temporal number.
Definition: temporal.c:1248
TBox * float_timestamp_to_tbox(double d, TimestampTz t)
Return a temporal box from a float and a timestamp.
Definition: tbox.c:508
GSERIALIZED * stbox_to_geo(const STBox *box)
Cast a spatiotemporal box as a PostGIS geometry.
Definition: stbox.c:374
STBox * timestamp_to_stbox(TimestampTz t)
Cast a timestamp to a spatiotemporal box.
Definition: stbox.c:546
STBox * periodset_to_stbox(const SpanSet *ps)
Cast a period set to a spatiotemporal box.
Definition: stbox.c:636
TBox * span_period_to_tbox(const Span *span, const Span *p)
Return a temporal box from a span and a period.
Definition: tbox.c:590
TBox * float_to_tbox(double d)
Cast a float to a temporal box.
Definition: tbox.c:266
STBox * tstzset_to_stbox(const Set *ts)
Cast a timestamp set to a spatiotemporal box.
Definition: stbox.c:576
Span * tbox_to_floatspan(const TBox *box)
Cast a temporal box as a span.
Definition: tbox.c:610
STBox * geo_period_to_stbox(const GSERIALIZED *gs, const Span *p)
Return a spatiotemporal box from a geometry/geography and a period.
Definition: stbox.c:668
TBox * span_timestamp_to_tbox(const Span *span, TimestampTz t)
Return a temporal box from a span and a timestamp.
Definition: tbox.c:572
Span * stbox_to_period(const STBox *box)
Cast a temporal box as a period.
Definition: stbox.c:403
TBox * int_period_to_tbox(int i, const Span *p)
Return a temporal box from an integer and a period.
Definition: tbox.c:541
TBox * period_to_tbox(const Span *p)
Cast a period to a temporal box.
Definition: tbox.c:408
STBox * geo_timestamp_to_stbox(const GSERIALIZED *gs, TimestampTz t)
Return a spatiotemporal box from a geometry/geography and a timestamp.
Definition: stbox.c:650
STBox * period_to_stbox(const Span *p)
Cast a period to a spatiotemporal box.
Definition: stbox.c:606
Span * tbox_to_period(const TBox *box)
Cast a temporal box as a period.
Definition: tbox.c:623
TBox * int_timestamp_to_tbox(int i, TimestampTz t)
Return a temporal box from an integer and a timestamp.
Definition: tbox.c:492
STBox * geo_to_stbox(const GSERIALIZED *gs)
Cast a geometry/geography to a spatiotemporal box.
Definition: stbox.c:493
bool stbox_eq(const STBox *box1, const STBox *box2)
Return true if the spatiotemporal boxes are equal.
Definition: stbox.c:1478
int stbox_cmp(const STBox *box1, const STBox *box2)
Return -1, 0, or 1 depending on whether the first spatiotemporal box is less than,...
Definition: stbox.c:1507
bool tbox_gt(const TBox *box1, const TBox *box2)
Return true if the first temporal box is greater than the second one.
Definition: tbox.c:1222
bool stbox_ne(const STBox *box1, const STBox *box2)
Return true if the spatiotemporal boxes are different.
Definition: stbox.c:1495
bool tbox_ge(const TBox *box1, const TBox *box2)
Return true if the first temporal box is greater than or equal to the second one.
Definition: tbox.c:1210
bool stbox_lt(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is less than the second one.
Definition: stbox.c:1574
bool stbox_ge(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is greater than or equal to the second one.
Definition: stbox.c:1600
bool tbox_le(const TBox *box1, const TBox *box2)
Return true if the first temporal box is less than or equal to the second one.
Definition: tbox.c:1197
bool tbox_lt(const TBox *box1, const TBox *box2)
Return true if the first temporal box is less than the second one.
Definition: tbox.c:1184
bool tbox_eq(const TBox *box1, const TBox *box2)
Return true if the temporal boxes are equal.
Definition: tbox.c:1117
int tbox_cmp(const TBox *box1, const TBox *box2)
Return -1, 0, or 1 depending on whether the first temporal box is less than, equal to,...
Definition: tbox.c:1150
bool tbox_ne(const TBox *box1, const TBox *box2)
Return true if the temporal boxes are different.
Definition: tbox.c:1135
bool stbox_le(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is less than or equal to the second one.
Definition: stbox.c:1587
bool stbox_gt(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is greater than the second one.
Definition: stbox.c:1612
TBox * tbox_copy(const TBox *box)
Return a copy of a temporal box.
Definition: tbox.c:183
TBox * tbox_make(const Span *p, const Span *s)
Construct a temporal box from the arguments.
Definition: tbox.c:144
STBox * stbox_make(bool hasx, bool hasz, bool geodetic, int32 srid, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const Span *p)
Construct a spatiotemporal box from the arguments.
Definition: stbox.c:246
void stbox_set(bool hasx, bool hasz, bool geodetic, int32 srid, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const Span *p, STBox *box)
Set a spatiotemporal box from the arguments.
Definition: stbox.c:264
void tbox_set(const Span *p, const Span *s, TBox *box)
Set a temporal box from the arguments.
Definition: tbox.c:159
STBox * stbox_copy(const STBox *box)
Return a copy of a spatiotemporal box.
Definition: stbox.c:304
STBox * stbox_in(const char *str)
Return a spatiotemporal box from its Well-Known Text (WKT) representation.
Definition: stbox.c:153
uint8_t * stbox_as_wkb(const STBox *box, uint8_t variant, size_t *size_out)
Return the WKB representation of a spatiotemporal box.
Definition: type_out.c:2422
TBox * tbox_in(const char *str)
Return a temporal box from its Well-Known Text (WKT) representation.
Definition: tbox.c:94
STBox * stbox_from_wkb(const uint8_t *wkb, int size)
Return a spatiotemporal box from its Well-Known Binary (WKB) representation.
Definition: type_in.c:1701
char * tbox_as_hexwkb(const TBox *box, uint8_t variant, size_t *size)
Return the WKB representation of a temporal box in hex-encoded ASCII.
Definition: type_out.c:2406
char * stbox_as_hexwkb(const STBox *box, uint8_t variant, size_t *size)
Return the WKB representation of a spatiotemporal box in hex-encoded ASCII.
Definition: type_out.c:2436
uint8_t * tbox_as_wkb(const TBox *box, uint8_t variant, size_t *size_out)
Return the WKB representation of a temporal box.
Definition: type_out.c:2392
TBox * tbox_from_wkb(const uint8_t *wkb, int size)
Return a temporal box from its Well-Known Binary (WKB) representation.
Definition: type_in.c:1675
TBox * tbox_from_hexwkb(const char *hexwkb)
Return a temporal box from its WKB representation in hex-encoded ASCII.
Definition: type_in.c:1686
char * tbox_out(const TBox *box, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal box.
Definition: tbox.c:104
STBox * stbox_from_hexwkb(const char *hexwkb)
Return a spatiotemporal box from its WKB representation in hex-encoded ASCII.
Definition: type_in.c:1713
char * stbox_out(const STBox *box, int maxdd)
Return the Well-Known Text (WKT) representation of a spatiotemporal box.
Definition: stbox.c:163
bool before_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is strictly before the second one.
Definition: tbox.c:983
bool overback_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box does not extend to the front of the second one.
Definition: stbox.c:1307
bool overbelow_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box does not extend above of the second one.
Definition: stbox.c:1217
bool left_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly to the left of the second one.
Definition: stbox.c:1142
bool overbefore_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box does not extend after the second one.
Definition: tbox.c:997
bool after_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is strictly after the second one.
Definition: tbox.c:1011
bool right_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly to the right of the second one.
Definition: stbox.c:1172
bool overabove_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box does not extend below of the second one.
Definition: stbox.c:1247
bool left_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is strictly to the left of the second one.
Definition: tbox.c:927
bool overright_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatio temporal box does not extend to the left of the second one.
Definition: stbox.c:1187
bool overafter_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first temporal box does not extend before the second one.
Definition: stbox.c:1365
bool back_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly back of the second one.
Definition: stbox.c:1292
bool after_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly after the second one.
Definition: stbox.c:1351
bool front_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly in front of the second one.
Definition: stbox.c:1262
bool overfront_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box does not extend to the back of the second one.
Definition: stbox.c:1277
bool overafter_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box does not extend before the second one.
Definition: tbox.c:1025
bool right_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is strictly to the right of the second one.
Definition: tbox.c:955
bool above_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly above of the second one.
Definition: stbox.c:1232
bool overbefore_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first temporal box does not extend after the second one.
Definition: stbox.c:1337
bool overleft_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box does not extend to the right of the second one.
Definition: tbox.c:941
bool overright_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box does not extend to the left of the second one.
Definition: tbox.c:969
bool before_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly before the second one.
Definition: stbox.c:1322
bool below_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is strictly below of the second one.
Definition: stbox.c:1202
bool overleft_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box does not extend to the right of the second one.
Definition: stbox.c:1157
STBox * union_stbox_stbox(const STBox *box1, const STBox *box2, bool strict)
Return the union of the spatiotemporal boxes.
Definition: stbox.c:1382
bool inter_stbox_stbox(const STBox *box1, const STBox *box2, STBox *result)
Set a spatiotemporal box with the result of the intersection of the first two boxes.
Definition: stbox.c:1405
TBox * intersection_tbox_tbox(const TBox *box1, const TBox *box2)
Return the intersection of the spatiotemporal boxes.
Definition: tbox.c:1094
TBox * union_tbox_tbox(const TBox *box1, const TBox *box2)
Return the union of the temporal boxes.
Definition: tbox.c:1042
STBox * intersection_stbox_stbox(const STBox *box1, const STBox *box2)
Return the intersection of the spatiotemporal boxes.
Definition: stbox.c:1452
bool inter_tbox_tbox(const TBox *box1, const TBox *box2, TBox *result)
Set a temporal box with the result of the intersection of the first two temporal boxes.
Definition: tbox.c:1068
bool contains_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box contains the second one.
Definition: tbox.c:838
bool adjacent_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the temporal boxes are adjacent.
Definition: tbox.c:900
bool adjacent_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the spatiotemporal boxes are adjacent.
Definition: stbox.c:1087
bool overlaps_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the spatiotemporal boxes overlap.
Definition: stbox.c:1043
bool overlaps_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the temporal boxes overlap.
Definition: tbox.c:866
bool contained_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box is contained by the second one.
Definition: stbox.c:1032
bool same_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the temporal boxes are equal on the common dimensions.
Definition: tbox.c:883
bool contains_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the first spatiotemporal box contains the second one.
Definition: stbox.c:1009
bool same_stbox_stbox(const STBox *box1, const STBox *box2)
Return true if the spatiotemporal boxes are equal on the common dimensions.
Definition: stbox.c:1066
bool contained_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is contained by the second one.
Definition: tbox.c:855
void stbox_expand(const STBox *box1, STBox *box2)
Expand the second spatiotemporal box with the first one.
Definition: stbox.c:69
void stbox_shift_tscale(STBox *box, const Interval *start, const Interval *duration)
Shift and/or scale a spatiotemporal box by the intervals.
Definition: stbox.c:95
TBox * tbox_expand_time(const TBox *box, const Interval *interval)
Return a temporal box expanded in the time dimension by an interval.
Definition: tbox.c:786
void tbox_shift_tscale(TBox *box, const Interval *start, const Interval *duration)
Return a temporal box shifted and/or scaled in the time dimension by the intervals.
Definition: tbox.c:759
void tbox_expand(const TBox *box1, TBox *box2)
Expand the second temporal box with the first one.
Definition: tbox.c:743
STBox * stbox_expand_time(const STBox *box, const Interval *interval)
Return a spatiotemporal box expanded in the temporal dimension by an interval.
Definition: stbox.c:947
TBox * tbox_expand_value(const TBox *box, const double d)
Return a temporal box expanded in the value dimension by a double.
Definition: tbox.c:771
STBox * stbox_set_srid(const STBox *box, int32 srid)
Set the SRID of a spatiotemporal box.
Definition: stbox.c:906
STBox * stbox_expand_space(const STBox *box, double d)
Return a spatiotemporal box expanded in the spatial dimension by a double.
Definition: stbox.c:924
int geoset_srid(const Set *set)
Return the SRID of a geoset point.
Definition: set.c:1064
Set * set_agg_finalfn(Set *state)
Transition function for set aggregate of values.
Definition: set_aggfuncs.c:217
void numspan_set_floatspan(const Span *s1, Span *s2)
Set the second span with the first one transformed to floatspan.
Definition: span.c:774
TSequence * tsequence_at_period(const TSequence *seq, const Span *p)
Restrict a temporal sequence to a period.
Definition: tsequence.c:5058
TimestampTz pg_timestamp_mi_interval(TimestampTz timestamp, const Interval *span)
Add an interval to a timestamp data type.
Definition: pg_types.c:1084
Interval * pg_interval_make(int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs)
Interval constructor.
Definition: pg_types.c:847
TimestampTz pg_timestamp_pl_interval(TimestampTz timestamp, const Interval *span)
Add an interval to a timestamp data type.
Definition: pg_types.c:1012
TimestampTz pg_timestamptz_in(const char *str, int32 typmod)
Convert a string to a timestamp with time zone.
Definition: pg_types.c:540
DateADT pg_date_in(const char *str)
Convert a string to a date in internal date format.
Definition: pg_types.c:218
char * pg_timestamp_out(Timestamp dt)
Convert a timestamp without timezone to a string.
Definition: pg_types.c:600
char * pg_date_out(DateADT date)
Convert a date in internal date format to a string.
Definition: pg_types.c:282
Interval * pg_interval_pl(const Interval *span1, const Interval *span2)
Add an interval to a timestamp data type.
Definition: pg_types.c:975
bool bool_in(const char *in_str)
Convert "t" or "f" to 1 or 0.
Definition: basetype_inout.c:151
Interval * pg_interval_in(const char *str, int32 typmod)
Convert a string to an interval.
Definition: pg_types.c:780
char * pg_timestamptz_out(TimestampTz dt)
Convert a timestamp with timezone to a string.
Definition: pg_types.c:589
Interval * pg_interval_mul(const Interval *span, double factor)
Multiply an interval by a scalar.
Definition: pg_types.c:898
char * bool_out(bool b)
Convert 1 or 0 to "t" or "f".
Definition: basetype_inout.c:183
Timestamp pg_timestamp_in(const char *str, int32 typmod)
Convert a string to a timestamp without time zone.
Definition: pg_types.c:551
TimeADT pg_time_in(const char *str, int32 typmod)
Convert a string to a time.
Definition: pg_types.c:354
char * pg_interval_out(const Interval *span)
Convert a time span to external form.
Definition: pg_types.c:876
char * pg_time_out(TimeADT time)
Convert a time to a string.
Definition: pg_types.c:386
int pg_interval_cmp(const Interval *interval1, const Interval *interval2)
Compare the two intervals.
Definition: pg_types.c:1189
Interval * pg_timestamp_mi(TimestampTz dt1, TimestampTz dt2)
Compute the difference of two timestamps.
Definition: pg_types.c:1135
bool pgis_gserialized_same(const GSERIALIZED *geom1, const GSERIALIZED *geom2)
Return true if the geometries are the same.
Definition: pgis_call.c:1687
char * gserialized_as_ewkt(const GSERIALIZED *geom, int precision)
Return the EWKT representation (and optionally a SRID) of a geometry.
Definition: pgis_call.c:1493
bytea * gserialized_as_ewkb(const GSERIALIZED *geom, char *type)
Return the EWKB representation of a geometry.
Definition: pgis_call.c:1571
GSERIALIZED * gserialized_from_hexewkb(const char *wkt)
Return a geometry from its WKT representation.
Definition: pgis_call.c:1508
GSERIALIZED * gserialized_from_text(char *wkt, int srid)
Return a geometry from its WKT representation (and optionally a SRID)
Definition: pgis_call.c:1445
GSERIALIZED * gserialized_from_ewkb(const bytea *bytea_wkb, int32 srid)
Return a geometry from its EWKB representation.
Definition: pgis_call.c:1546
char * gserialized_out(const GSERIALIZED *geom)
Output function for geometries.
Definition: pgis_call.c:1430
char * gserialized_as_hexewkb(const GSERIALIZED *geom, const char *type)
Return the WKB representation of a geometry in hex-encoded ASCII.
Definition: pgis_call.c:1519
GSERIALIZED * gserialized_from_geojson(const char *geojson)
Input a geometry from GeoJSON format.
Definition: pgis_call.c:1599
char * gserialized_as_geojson(const GSERIALIZED *geom, int option, int precision, char *srs)
Output a geometry in GeoJSON format.
Definition: pgis_call.c:1633
GSERIALIZED * gserialized_in(char *input, int32 geom_typmod)
Input function for geometries.
Definition: pgis_call.c:1328
char * gserialized_as_text(const GSERIALIZED *geom, int precision)
Return the WKT representation (and optionally a SRID) of a geometry.
Definition: pgis_call.c:1479
TimestampTz tstzset_end_timestamp(const Set *ts)
Return the end value of a set.
Definition: set.c:872
double * floatset_values(const Set *s)
Return the array of values of a float set.
Definition: set.c:1034
int * intset_values(const Set *s)
Return the array of values of an integer set.
Definition: set.c:1004
uint32 spanset_hash(const SpanSet *ps)
Return the 32-bit hash value of a span set.
Definition: spanset.c:1048
int bigintspanset_upper(const SpanSet *ss)
Return the upper bound of an integer span set.
Definition: spanset.c:602
bool span_lower_inc(const Span *s)
Return true if the lower bound of a span is inclusive.
Definition: span.c:723
int bigintspan_lower(const Span *s)
Return the lower bound of an integer span.
Definition: span.c:643
Datum * set_values(const Set *s)
Return the array of values of a set.
Definition: set.c:988
uint64 set_hash_extended(const Set *s, uint64 seed)
Return the 64-bit hash of a set using a seed.
Definition: set.c:1284
Interval * periodset_duration(const SpanSet *ps, bool boundspan)
Return the duration of a period set.
Definition: spanset.c:679
TimestampTz * tstzset_timestamps(const Set *ts)
Return the array of timestamps of a set.
Definition: set.c:1050
bool spanset_upper_inc(const SpanSet *ss)
Return true if the upper bound of a span set is inclusive.
Definition: spanset.c:650
bool bigintset_value_n(const Set *s, int n, int64 *result)
Return the n-th value of a big integer set.
Definition: set.c:932
Span * spanset_start_span(const SpanSet *ss)
Return the start span of a span set.
Definition: spanset.c:861
int intset_start_value(const Set *s)
Return the start value of an integer set.
Definition: set.c:767
int intspan_upper(const Span *s)
Return the upper bound of an integer span.
Definition: span.c:677
int bigintspanset_lower(const SpanSet *ss)
Return the lower bound of an integer span set.
Definition: spanset.c:557
int intspanset_upper(const SpanSet *ss)
Return the upper bound of an integer span set.
Definition: spanset.c:591
uint32 span_hash(const Span *s)
Return the 32-bit hash of a span.
Definition: span.c:1031
uint32 set_hash(const Set *s)
Return the 32-bit hash of a set.
Definition: set.c:1266
bool set_value_n(const Set *s, int n, Datum *result)
Return the n-th value of a set.
Definition: set.c:891
double span_width(const Span *s)
Return the width of a span as a double.
Definition: span.c:747
uint64 spanset_hash_extended(const SpanSet *ps, uint64 seed)
Return the 64-bit hash value of a span set using a seed.
Definition: spanset.c:1066
Datum set_start_value(const Set *s)
Return the start value of a set.
Definition: set.c:754
int intset_end_value(const Set *s)
Return the end value of an integer set.
Definition: set.c:833
double floatspanset_lower(const SpanSet *ss)
Return the lower bound of a float span set.
Definition: spanset.c:568
const Span ** spanset_spans(const SpanSet *ss, int *count)
Return the spans of a span set.
Definition: spanset.c:904
double spanset_width(const SpanSet *ss)
Return the width of a span set as a double.
Definition: spanset.c:661
double floatspanset_upper(const SpanSet *ss)
Return the upper bound of a float span set.
Definition: spanset.c:613
TimestampTz periodset_end_timestamp(const SpanSet *ps)
Return the end timestamp of a period set.
Definition: spanset.c:754
bool periodset_timestamp_n(const SpanSet *ps, int n, TimestampTz *result)
Return the n-th timestamp of a period set.
Definition: spanset.c:772
int64 * bigintset_values(const Set *s)
Return the array of values of a big integer set.
Definition: set.c:1019
int periodset_num_timestamps(const SpanSet *ps)
Return the number of timestamps of a period set.
Definition: spanset.c:704
int set_mem_size(const Set *s)
Return the size in bytes of a set.
Definition: set.c:729
Interval * period_duration(const Span *s)
Return the duration of a period as an interval.
Definition: span.c:759
bool floatset_value_n(const Set *s, int n, double *result)
Return the n-th value of a float set.
Definition: set.c:952
double floatset_start_value(const Set *s)
Return the start value of a float set.
Definition: set.c:793
int spanset_num_spans(const SpanSet *ss)
Return the number of spans of a span set.
Definition: spanset.c:849
TimestampTz periodset_start_timestamp(const SpanSet *ps)
Return the start timestamp of a period set.
Definition: spanset.c:741
int set_num_values(const Set *s)
Return the number of values of a set.
Definition: set.c:742
TimestampTz period_upper(const Span *p)
Return the upper bound of a period.
Definition: span.c:711
Span * spanset_end_span(const SpanSet *ss)
Return the end span of a span set.
Definition: spanset.c:874
uint64 span_hash_extended(const Span *s, Datum seed)
Return the 64-bit hash of a span using a seed.
Definition: span.c:1066
int64 bigintset_end_value(const Set *s)
Return the end value of a big integer set.
Definition: set.c:846
int64 bigintset_start_value(const Set *s)
Return the start value of a big integer set.
Definition: set.c:780
bool span_upper_inc(const Span *s)
Return true if the upper bound of a span is inclusive.
Definition: span.c:735
TimestampTz periodset_upper(const SpanSet *ps)
Return the upper bound of a period.
Definition: spanset.c:625
TimestampTz * periodset_timestamps(const SpanSet *ps, int *count)
Return the timestamps of a period set.
Definition: spanset.c:822
int bigintspan_upper(const Span *s)
Return the upper bound of an integer span.
Definition: span.c:688
Datum set_end_value(const Set *s)
Return the end value of a set.
Definition: set.c:820
int intspan_lower(const Span *s)
Return the lower bound of an integer span.
Definition: span.c:632
bool spanset_lower_inc(const SpanSet *ss)
Return true if the lower bound of a span set is inclusive.
Definition: spanset.c:638
double floatspan_lower(const Span *s)
Return the lower bound of a float span.
Definition: span.c:654
double floatspan_upper(const Span *s)
Return the upper bound of a float span.
Definition: span.c:699
bool tstzset_timestamp_n(const Set *ts, int n, TimestampTz *result)
Return the n-th value of a set.
Definition: set.c:972
TimestampTz period_lower(const Span *p)
Return the lower bound of a period.
Definition: span.c:666
TimestampTz periodset_lower(const SpanSet *ps)
Return the lower bound of a period.
Definition: spanset.c:580
int spanset_mem_size(const SpanSet *ss)
Return the size in bytes of a period set.
Definition: spanset.c:535
bool intset_value_n(const Set *s, int n, int *result)
Return the n-th value of an integer set.
Definition: set.c:912
double floatset_end_value(const Set *s)
Return the end value of a float set.
Definition: set.c:859
TimestampTz tstzset_start_timestamp(const Set *ts)
Return the start value of a set.
Definition: set.c:806
int intspanset_lower(const SpanSet *ss)
Return the lower bound of an integer span set.
Definition: spanset.c:546
Span * spanset_span_n(const SpanSet *ss, int i)
Return the n-th span of a span set.
Definition: spanset.c:887
SkipList * timestamp_tcount_transfn(SkipList *state, TimestampTz t)
Transition function for temporal count aggregate of timestamps.
Definition: time_aggfuncs.c:416
Span * int_extent_transfn(Span *s, int i)
Transition function for extent aggregate of base types of spans.
Definition: span_aggfuncs.c:76
Span * bigint_extent_transfn(Span *s, int64 i)
Transition function for extent aggregate of base types of spans.
Definition: span_aggfuncs.c:86
SkipList * tstzset_tunion_transfn(SkipList *state, const Set *ts)
Transition function for aggregating timestamp sets.
Definition: time_aggfuncs.c:213
SkipList * periodset_tcount_transfn(SkipList *state, const SpanSet *ps)
Transition function for temporal count aggregate of period sets.
Definition: time_aggfuncs.c:488
SkipList * period_tcount_transfn(SkipList *state, const Span *p)
Transition function for temporal count aggregate of periods.
Definition: time_aggfuncs.c:465
SkipList * timestamp_tunion_transfn(SkipList *state, TimestampTz t)
Transition function for tunion aggregate of timestamps.
Definition: time_aggfuncs.c:192
Set * tstzset_agg_transfn(Set *state, TimestampTz t)
Transition function for set aggregate of values.
Definition: set_aggfuncs.c:196
Set * timestamp_tunion_finalfn(SkipList *state)
Final function for union aggregation of timestamp set values.
Definition: time_aggfuncs.c:282
Span * span_extent_transfn(Span *s1, const Span *s2)
Transition function for extent aggregate of span values.
Definition: span_aggfuncs.c:140
Set * bigintset_agg_transfn(Set *state, int64 i)
Transition function for set aggregate of values.
Definition: set_aggfuncs.c:176
SkipList * periodset_tunion_transfn(SkipList *state, const SpanSet *ps)
Generic transition function for aggregating period set values.
Definition: time_aggfuncs.c:257
Span * spanset_extent_transfn(Span *s, const SpanSet *ss)
Transition function for extent aggregate of span set values.
Definition: span_aggfuncs.c:161
SkipList * period_tunion_transfn(SkipList *state, const Span *p)
Generic transition function for aggregating period values.
Definition: time_aggfuncs.c:236
Span * set_extent_transfn(Span *span, const Set *set)
Transition function for extent aggregate of timestamp set values.
Definition: span_aggfuncs.c:117
Span * float_extent_transfn(Span *s, double d)
Transition function for extent aggregate of base types of spans.
Definition: span_aggfuncs.c:96
SkipList * tstzset_tcount_transfn(SkipList *state, const Set *ts)
Transition function for temporal count aggregate of timestamp sets.
Definition: time_aggfuncs.c:439
SpanSet * period_tunion_finalfn(SkipList *state)
Final function for union aggregation of period (set) values.
Definition: time_aggfuncs.c:300
Span * timestamp_extent_transfn(Span *p, TimestampTz t)
Transition function for extent aggregate of base types of spans.
Definition: span_aggfuncs.c:106
Set * textset_agg_transfn(Set *state, const text *txt)
Transition function for set aggregate of values.
Definition: set_aggfuncs.c:206
Set * floatset_agg_transfn(Set *state, double d)
Transition function for set aggregate of values.
Definition: set_aggfuncs.c:186
Set * bigint_to_bigintset(int64 i)
Cast a value as a set.
Definition: set.c:630
Set * float_to_floatset(double d)
Cast a value as a set.
Definition: set.c:642
void spatialset_set_stbox(const Set *set, STBox *box)
Set the last argument to the bounding box of a spatial set.
Definition: set.c:695
Span * float_to_floaspan(double d)
Cast a value as a span.
Definition: span.c:600
SpanSet * span_to_spanset(const Span *s)
Cast a period as a period set.
Definition: spanset.c:434
Set * timestamp_to_tstzset(TimestampTz t)
Cast a value as a set.
Definition: set.c:654
Span * set_to_span(const Set *s)
Return the bounding span of a set.
Definition: set.c:681
Set * int_to_intset(int i)
Cast a value as a set.
Definition: set.c:618
SpanSet * set_to_spanset(const Set *s)
Cast a set as a span set.
Definition: spanset.c:416
Span * timestamp_to_period(TimestampTz t)
Cast a timestamp as a period.
Definition: span.c:614
SpanSet * timestamp_to_periodset(TimestampTz t)
Cast a timestamp as a period set.
Definition: spanset.c:405
void set_set_span(const Set *os, Span *s)
Set the last argument to the bounding span of a set.
Definition: set.c:666
Span * int_to_intspan(int i)
Cast a value as a span.
Definition: span.c:574
STBox * spatialset_to_stbox(const Set *s)
Return the bounding box of a spatial set.
Definition: set.c:711
bool span_eq(const Span *s1, const Span *s2)
Return true if the first span is equal to the second one.
Definition: span.c:922
bool spanset_eq(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is equal to the second one.
Definition: spanset.c:925
int set_cmp(const Set *s1, const Set *s2)
Return -1, 0, or 1 depending on whether the first set is less than, equal, or greater than the second...
Definition: set.c:1182
bool set_ge(const Set *s1, const Set *s2)
Return true if the first set is greater than or equal to the second one.
Definition: set.c:1238
bool spanset_le(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is less than or equal to the second one.
Definition: spanset.c:1008
bool span_lt(const Span *s1, const Span *s2)
Return true if the first span is less than the second one.
Definition: span.c:978
bool set_ne(const Set *s1, const Set *s2)
Return true if the first set is different from the second one.
Definition: set.c:1169
bool set_eq(const Set *s1, const Set *s2)
Return true if the first set is equal to the second one.
Definition: set.c:1144
bool spanset_lt(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is less than the second one.
Definition: spanset.c:996
int span_cmp(const Span *s1, const Span *s2)
Return -1, 0, or 1 depending on whether the first span is less than, equal, or greater than the secon...
Definition: span.c:953
bool set_lt(const Set *s1, const Set *s2)
Return true if the first set is less than the second one.
Definition: set.c:1214
bool span_gt(const Span *s1, const Span *s2)
Return true if the first span is greater than the second one.
Definition: span.c:1016
int spanset_cmp(const SpanSet *ss1, const SpanSet *ss2)
Return -1, 0, or 1 depending on whether the first span set is less than, equal, or greater than the s...
Definition: spanset.c:962
bool spanset_gt(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is greater than the second one.
Definition: spanset.c:1031
bool spanset_ge(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is greater than or equal to the second one.
Definition: spanset.c:1020
bool spanset_ne(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is different from the second one.
Definition: spanset.c:949
bool span_le(const Span *s1, const Span *s2)
Return true if the first span is less than or equal to the second one.
Definition: span.c:991
bool span_ne(const Span *s1, const Span *s2)
Return true if the first span is different from the second one.
Definition: span.c:937
bool span_ge(const Span *s1, const Span *s2)
Return true if the first span is greater than or equal to the second one.
Definition: span.c:1004
bool set_gt(const Set *s1, const Set *s2)
Return true if the first set is greater than the second one.
Definition: set.c:1249
bool set_le(const Set *s1, const Set *s2)
Return true if the first set is less than or equal to the second one.
Definition: set.c:1226
Span * floatspan_make(double lower, double upper, bool lower_inc, bool upper_inc)
Construct a span from the bounds.
Definition: span.c:442
SpanSet * spanset_make_free(Span **spans, int count, bool normalize)
Construct a span set from an array of spans and free the array and the spans after the creation.
Definition: spanset.c:321
Span * period_make(TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc)
Construct a period from the bounds.
Definition: span.c:457
Set * set_copy(const Set *ts)
Return a copy of a set.
Definition: set.c:589
SpanSet * spanset_copy(const SpanSet *ps)
Return a copy of a span set.
Definition: spanset.c:338
Span * intspan_make(int lower, int upper, bool lower_inc, bool upper_inc)
Construct an integer span from the bounds.
Definition: span.c:412
Span * span_copy(const Span *s)
Return a copy of a span.
Definition: span.c:532
Span * bigintspan_make(int64 lower, int64 upper, bool lower_inc, bool upper_inc)
Construct an integer span from the bounds.
Definition: span.c:427
SpanSet * spanset_make(const Span **spans, int count, bool normalize)
Construct a span set from an array of disjoint span.
Definition: spanset.c:270
double distance_set_set(const Set *s1, const Set *s2)
Return the distance between two sets.
Definition: set_ops.c:1474
double distance_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the distance between two span sets.
Definition: spanset_ops.c:1828
double distance_floatspan_float(const Span *s, double d)
Return the distance between a float span and a float.
Definition: span_ops.c:1462
double distance_period_timestamp(const Span *p, TimestampTz t)
Return the distance in seconds between a period and a timestamp.
Definition: span_ops.c:1473
double distance_span_span(const Span *s1, const Span *s2)
Return the distance between two spans.
Definition: span_ops.c:1485
double distance_spanset_span(const SpanSet *ss, const Span *s)
Return the distance between a span set and a span.
Definition: spanset_ops.c:1817
double distance_intspan_int(const Span *s, int i)
Return the distance between an integer span and an integer.
Definition: span_ops.c:1440
double distance_periodset_timestamp(const SpanSet *ps, TimestampTz t)
Return the distance in seconds between a period set and a timestamp.
Definition: spanset_ops.c:1805
double distance_timestampset_timestamp(const Set *ts, TimestampTz t)
Return the distance in seconds between a timestamp set and a timestamp.
Definition: set_ops.c:1463
Set * floatset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set.c:176
SpanSet * spanset_from_wkb(const uint8_t *wkb, int size)
Return a period set from its Well-Known Binary (WKB) representation.
Definition: type_in.c:1647
Set * tstzset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set.c:186
char * set_out(const Set *s, int maxdd)
Return the Well-Known Text (WKT) representation of a set.
Definition: set.c:231
Set * set_from_wkb(const uint8_t *wkb, int size)
Return a set from its Well-Known Binary (WKB) representation.
Definition: type_in.c:1590
SpanSet * bigintspanset_in(const char *str)
Return a big integer span from its Well-Known Text (WKT) representation.
Definition: spanset.c:141
char * floatspanset_out(const SpanSet *ss, int maxdd)
Return the Well-Known Text (WKT) representation of a span set.
Definition: spanset.c:213
char * spanset_out(const SpanSet *ss, int maxdd)
Return the Well-Known Text (WKT) representation of a span set.
Definition: spanset.c:172
char * period_out(const Span *s)
Return the Well-Known Text (WKT) representation of a span.
Definition: span.c:381
Span * intspan_in(const char *str)
Return an integer span from its Well-Known Text (WKT) representation.
Definition: span.c:271
SpanSet * floatspanset_in(const char *str)
Return a float span from its Well-Known Text (WKT) representation.
Definition: spanset.c:151
uint8_t * spanset_as_wkb(const SpanSet *ss, uint8_t variant, size_t *size_out)
Return the WKB representation of a period set.
Definition: type_out.c:2362
char * periodset_out(const SpanSet *ss)
Return the Well-Known Text (WKT) representation of a span set.
Definition: spanset.c:223
SpanSet * periodset_in(const char *str)
Return a period set from its Well-Known Text (WKT) representation.
Definition: spanset.c:161
Set * intset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set.c:156
Set * bigintset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set.c:166
SpanSet * spanset_from_hexwkb(const char *hexwkb)
Return a period set from its WKB representation in hex-encoded ASCII.
Definition: type_in.c:1659
char * floatspan_out(const Span *s, int maxdd)
Return the Well-Known Text (WKT) representation of a span.
Definition: span.c:351
uint8_t * set_as_wkb(const Set *s, uint8_t variant, size_t *size_out)
Return the WKB representation of a set.
Definition: type_out.c:2332
Span * floatspan_in(const char *str)
Return a float span from its Well-Known Text (WKT) representation.
Definition: span.c:291
Span * bigintspan_in(const char *str)
Return an integer span from its Well-Known Text (WKT) representation.
Definition: span.c:281
char * intspanset_out(const SpanSet *ss)
Return the Well-Known Text (WKT) representation of a span set.
Definition: spanset.c:193
Span * span_from_hexwkb(const char *hexwkb)
Return a span from its WKB representation in hex-encoded ASCII.
Definition: type_in.c:1631
Span * span_from_wkb(const uint8_t *wkb, int size)
Return a span from its Well-Known Binary (WKB) representation.
Definition: type_in.c:1619
SpanSet * intspanset_in(const char *str)
Return an integer span from its Well-Known Text (WKT) representation.
Definition: spanset.c:131
char * span_out(const Span *s, int maxdd)
Return the Well-Known Text (WKT) representation of a span.
Definition: span.c:333
uint8_t * span_as_wkb(const Span *s, uint8_t variant, size_t *size_out)
Return the WKB representation of a span.
Definition: type_out.c:2302
Span * period_in(const char *str)
Return a period from its Well-Known Text (WKT) representation.
Definition: span.c:301
char * intspan_out(const Span *s)
Return the Well-Known Text (WKT) representation of a span.
Definition: span.c:361
char * bigintspan_out(const Span *s)
Return the Well-Known Text (WKT) representation of a span.
Definition: span.c:371
Set * set_from_hexwkb(const char *hexwkb)
Return a set from its WKB representation in hex-encoded ASCII.
Definition: type_in.c:1603
bool overbefore_timestamp_timestampset(TimestampTz t, const Set *ts)
Return true if a timestamp is not after a timestamp set.
Definition: set_ops.c:761
bool before_periodset_timestamp(const SpanSet *ps, TimestampTz t)
Return true if a period set is strictly before a timestamp.
Definition: spanset_ops.c:640
bool overright_float_floatspan(double d, const Span *s)
Return true if a float does not extend to the left of a float span.
Definition: span_ops.c:790
bool right_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span is strictly to the right of a span set.
Definition: spanset_ops.c:737
bool overafter_period_timestamp(const Span *p, TimestampTz t)
Return true if a period is not before a timestamp.
Definition: span_ops.c:852
bool left_float_floatspan(double d, const Span *s)
Return true if a float is strictly to the left of a float span.
Definition: span_ops.c:397
bool overright_intspan_int(const Span *s, int i)
Return true if an integer span does not extend to the left of an integer.
Definition: span_ops.c:824
bool overright_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set does not extend to the right of the second one.
Definition: spanset_ops.c:1125
bool overright_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set does not extend to the right of a span.
Definition: spanset_ops.c:1112
bool overafter_periodset_timestamp(const SpanSet *ps, TimestampTz t)
Return true if a span set does not extend to the left of a value.
Definition: spanset_ops.c:1100
bool overbefore_timestamp_period(TimestampTz t, const Span *p)
Return true if a timestamp is not after a period.
Definition: span_ops.c:667
bool overleft_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set does not extend to the right of the second one.
Definition: spanset_ops.c:969
bool after_timestamp_timestampset(TimestampTz t, const Set *ts)
Return true if a timestamp is strictly after a timestamp set.
Definition: set_ops.c:609
bool left_intspan_int(const Span *s, int i)
Return true if an integer span is strictly to the left of an integer.
Definition: span_ops.c:433
bool right_set_set(const Set *s1, const Set *s2)
Return true if the first set is strictly to the right of the second one.
Definition: set_ops.c:690
bool overleft_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set does not extend to the right of a span.
Definition: spanset_ops.c:956
bool overright_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span does not extend to the left of a span set.
Definition: spanset_ops.c:1043
bool right_int_intspan(int i, const Span *s)
Return true if an integer is strictly to the right of an integer span.
Definition: span_ops.c:506
bool overbefore_timestamp_periodset(TimestampTz t, const SpanSet *ps)
Return true if a timestamp is not after a period set.
Definition: spanset_ops.c:932
bool right_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set is strictly after a span.
Definition: spanset_ops.c:804
bool left_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is strictly before the second one.
Definition: spanset_ops.c:664
bool before_timestamp_timestampset(TimestampTz t, const Set *ts)
Return true if a timestamp is strictly before the second one.
Definition: set_ops.c:456
bool left_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set is strictly before a span.
Definition: spanset_ops.c:652
bool overafter_timestamp_periodset(TimestampTz t, const SpanSet *ps)
Return true if a timestamp is not before a period set.
Definition: spanset_ops.c:1031
bool overright_set_set(const Set *s1, const Set *s2)
Return true if the first set does not extend to the left of the second one.
Definition: set_ops.c:986
bool right_span_span(const Span *s1, const Span *s2)
Return true if the first span is strictly to right the of the second one.
Definition: span_ops.c:607
bool overright_int_intspan(int i, const Span *s)
Return true if an integer does not extend to the left of an integer span.
Definition: span_ops.c:768
bool right_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is strictly after the second one.
Definition: spanset_ops.c:815
bool overbefore_period_timestamp(const Span *p, TimestampTz t)
Return true if a period is not after a timestamp.
Definition: span_ops.c:727
bool overright_span_span(const Span *s1, const Span *s2)
Return true if the first span does not extend to the left of the second one.
Definition: span_ops.c:864
bool overleft_float_floatspan(double d, const Span *s)
Return true if a float does not extend to the right of a float span.
Definition: span_ops.c:656
bool left_set_set(const Set *s1, const Set *s2)
Return true if the first set is strictly to the left of a second one.
Definition: set_ops.c:537
bool overleft_int_intspan(int i, const Span *s)
Return true if an integer does not extend to the right of an integer span.
Definition: span_ops.c:634
bool overleft_set_set(const Set *s1, const Set *s2)
Return true if the first set does not extend to the right of the second one.
Definition: set_ops.c:843
bool overleft_floatspan_float(const Span *s, double d)
Return true if a float span does not extend to the right of a float.
Definition: span_ops.c:716
bool left_span_span(const Span *s1, const Span *s2)
Return true if the first span is strictly to the left of the second one.
Definition: span_ops.c:478
bool left_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span is strictly before a span set.
Definition: spanset_ops.c:583
bool left_floatspan_float(const Span *s, double d)
Return true if a float span is strictly to the left of a float.
Definition: span_ops.c:455
bool overafter_timestamp_timestampset(TimestampTz t, const Set *ts)
Return true if a timestamp is not before a timestamp set.
Definition: set_ops.c:905
bool overleft_span_span(const Span *s1, const Span *s2)
Return true if the first span does not extend to the right of the second one.
Definition: span_ops.c:739
bool right_intspan_int(const Span *s, int i)
Return true if an integer span is strictly to the right of an integer.
Definition: span_ops.c:562
bool overafter_timestamp_period(TimestampTz t, const Span *p)
Return true if a timestamp is not before a period.
Definition: span_ops.c:801
bool overright_floatspan_float(const Span *s, double d)
Return true if a float span does not extend to the left of a float.
Definition: span_ops.c:841
bool overleft_intspan_int(const Span *s, int i)
Return true if an integer span does not extend to the right of an integer.
Definition: span_ops.c:694
bool overleft_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span does not extend to the right of a span set.
Definition: spanset_ops.c:944
bool left_int_intspan(int i, const Span *s)
Return true if an integer is strictly to the left of an integer span.
Definition: span_ops.c:375
bool right_float_floatspan(double d, const Span *s)
Return true if a float is strictly to the right of a float span.
Definition: span_ops.c:528
bool overbefore_periodset_timestamp(const SpanSet *ps, TimestampTz t)
Return true if a period set is not after a timestamp.
Definition: spanset_ops.c:875
bool right_floatspan_float(const Span *s, double d)
Return true if a float is strictly to the right of a float span.
Definition: span_ops.c:584
SpanSet * union_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the union of two span sets.
Definition: spanset_ops.c:1217
SpanSet * intersection_spanset_span(const SpanSet *ss, const Span *s)
Return the intersection of a span set and a span.
Definition: spanset_ops.c:1397
SpanSet * minus_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the difference of two span sets.
Definition: spanset_ops.c:1704
SpanSet * minus_periodset_timestamp(const SpanSet *ps, TimestampTz t)
Return the difference of a period set and a timestamp.
Definition: spanset_ops.c:1668
bool minus_timestamp_period(TimestampTz t, const Span *p, TimestampTz *result)
Return the difference of a timestamp and a period.
Definition: span_ops.c:1172
bool minus_timestamp_periodset(TimestampTz t, const SpanSet *ps, TimestampTz *result)
Return the difference of a timestamp and a period set.
Definition: spanset_ops.c:1533
Set * intersection_set_set(const Set *s1, const Set *s2)
Return the intersection of two sets.
Definition: set_ops.c:1207
SpanSet * minus_spanset_span(const SpanSet *ss, const Span *s)
Return the difference of a span set and a span.
Definition: spanset_ops.c:1680
bool intersection_period_timestamp(const Span *p, TimestampTz t, TimestampTz *result)
Return the intersection of a period and a timestamp.
Definition: span_ops.c:1053
SpanSet * intersection_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the intersection of two span sets.
Definition: spanset_ops.c:1431
SpanSet * union_period_timestamp(const Span *p, TimestampTz t)
Return the union of a period and a timestamp.
Definition: span_ops.c:945
Set * minus_timestampset_timestamp(const Set *ts, TimestampTz t)
Return the difference of a timestamp set and a timestamp.
Definition: set_ops.c:1364
Set * union_timestamp_timestampset(TimestampTz t, const Set *ts)
Return the union of a timestamp and a timestamp set.
Definition: set_ops.c:1091
Set * union_set_set(const Set *s1, const Set *s2)
Return the union of two sets.
Definition: set_ops.c:1103
SpanSet * minus_span_span(const Span *s1, const Span *s2)
Return the difference of two spans.
Definition: span_ops.c:1364
SpanSet * union_span_span(const Span *s1, const Span *s2)
Return the union of two spans.
Definition: span_ops.c:957
bool intersection_periodset_timestamp(const SpanSet *ps, TimestampTz t, TimestampTz *result)
Return the intersection of a period set and a timestamp.
Definition: spanset_ops.c:1381
SpanSet * union_spanset_span(const SpanSet *ss, const Span *s)
Return the union of a span set and a span.
Definition: spanset_ops.c:1201
Set * minus_set_set(const Set *s1, const Set *s2)
Return the difference of two sets.
Definition: set_ops.c:1391
SpanSet * minus_span_spanset(const Span *s, const SpanSet *ss)
Return the difference of a span and a span set.
Definition: spanset_ops.c:1593
Span * intersection_span_span(const Span *s1, const Span *s2)
Return the intersection of two spans.
Definition: span_ops.c:1094
SpanSet * minus_period_timestamp(const Span *p, TimestampTz t)
Return the difference of a period and a timestamp.
Definition: span_ops.c:1285
Span * bbox_union_span_span(const Span *s1, const Span *s2)
Return the union of the spans.
Definition: span_ops.c:883
SpanSet * union_periodset_timestamp(SpanSet *ps, TimestampTz t)
Return the union of a period set and a timestamp.
Definition: spanset_ops.c:1189
bool intersection_timestampset_timestamp(const Set *ts, const TimestampTz t, TimestampTz *result)
Return the intersection of a timestamp set and a timestamp.
Definition: set_ops.c:1190
Set * union_timestampset_timestamp(const Set *ts, const TimestampTz t)
Return the union of a timestamp set and a timestamp.
Definition: set_ops.c:1080
bool overlaps_set_set(const Set *s1, const Set *s2)
Return true if the sets overlap.
Definition: set_ops.c:368
bool adjacent_span_span(const Span *s1, const Span *s2)
Return true if the spans are adjacent.
Definition: span_ops.c:339
bool overlaps_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span and a span set overlap.
Definition: spanset_ops.c:359
bool contained_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is contained by the second one.
Definition: spanset_ops.c:344
bool contained_int_intspan(int i, const Span *s)
Return true if an integer is contained by an integer span.
Definition: span_ops.c:194
bool contains_floatspan_float(const Span *s, double d)
Return true if a float span contains a float.
Definition: span_ops.c:136
bool adjacent_floatspan_float(const Span *s, double d)
Return true if a float span and a float are adjacent.
Definition: span_ops.c:316
bool contains_intspan_int(const Span *s, int i)
Return true if an integer span contains an integer.
Definition: span_ops.c:114
bool contained_bigint_bigintset(int64 i, const Set *s)
Return true if a value is contained by a set.
Definition: set_ops.c:307
bool contained_float_floatspan(double d, const Span *s)
Return true if a float is contained by a float span.
Definition: span_ops.c:216
bool contains_period_timestamp(const Span *p, TimestampTz t)
Return true if a period contains a timestamp.
Definition: span_ops.c:149
bool contained_bigint_bigintspan(int64 i, const Span *s)
Return true if an integer is contained by an integer span.
Definition: span_ops.c:205
bool contains_set_set(const Set *s1, const Set *s2)
Return true if the first set contains the second one.
Definition: set_ops.c:251
bool contains_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set contains the second one.
Definition: spanset_ops.c:231
bool adjacent_bigintspan_bigint(const Span *s, int64 i)
Return true if an integer span and an integer are adjacent.
Definition: span_ops.c:305
bool adjacent_periodset_timestamp(const SpanSet *ps, TimestampTz t)
Return true if a period set a timestamp are adjacent.
Definition: spanset_ops.c:472
bool contained_timestamp_timestampset(TimestampTz t, const Set *ts)
Return true if a timestamp is contained by a timestamp set.
Definition: set_ops.c:340
bool overlaps_span_span(const Span *s1, const Span *s2)
Return true if the spans overlap.
Definition: span_ops.c:255
bool contained_float_floatset(double d, const Set *s)
Return true if a value is contained by a set.
Definition: set_ops.c:318
bool contained_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span is contained by a span.
Definition: spanset_ops.c:322
bool contained_span_span(const Span *s1, const Span *s2)
Return true if the first span is contained by the second one.
Definition: span_ops.c:239
bool overlaps_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if two span sets overlap.
Definition: spanset_ops.c:385
bool contained_bigint_bigintspanset(int64 i, const SpanSet *ss)
Return true if a value is contained by a span.
Definition: spanset_ops.c:299
bool contained_float_floatspanset(double d, const SpanSet *ss)
Return true if a value is contained by a span.
Definition: spanset_ops.c:310
bool contains_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span contains a span set.
Definition: spanset_ops.c:220
bool adjacent_bigintspanset_bigint(const SpanSet *ss, int64 i)
Return true if a span set and a value are adjacent.
Definition: spanset_ops.c:450
bool contains_timestampset_timestamp(const Set *ts, TimestampTz t)
Return true if a timestamp set contains a timestamp.
Definition: set_ops.c:239
bool contains_periodset_timestamp(const SpanSet *ps, TimestampTz t)
Return true if a period set contains a timestamp.
Definition: spanset_ops.c:191
bool contained_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set is contained by a span.
Definition: spanset_ops.c:333
bool contained_int_intspanset(int i, const SpanSet *ss)
Return true if a value is contained by a span.
Definition: spanset_ops.c:288
bool contains_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set contains a span.
Definition: spanset_ops.c:202
bool adjacent_intspan_int(const Span *s, int i)
Return true if an integer span and an integer are adjacent.
Definition: span_ops.c:294
bool contained_int_intset(int i, const Set *s)
Return true if a value is contained by a set.
Definition: set_ops.c:296
bool adjacent_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set and a span are adjacent.
Definition: spanset_ops.c:484
bool adjacent_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if a span set and a span are adjacent.
Definition: spanset_ops.c:502
bool contains_span_span(const Span *s1, const Span *s2)
Return true if the first span contains the second one.
Definition: span_ops.c:160
bool contained_timestamp_period(TimestampTz t, const Span *p)
Return true if a timestamp is contained by a period.
Definition: span_ops.c:227
bool contained_set_set(const Set *s1, const Set *s2)
Return true if a set is contained by the second one.
Definition: set_ops.c:352
void span_expand(const Span *s1, Span *s2)
Expand the second span with the first one.
Definition: span.c:835
void intspan_set_floatspan(const Span *s1, Span *s2)
Set the second span with the first one transformed to floatspan.
Definition: span.c:807
Set * tstzset_shift_tscale(const Set *ts, const Interval *shift, const Interval *duration)
Return a timestamp set uned and/or scaled by the intervals.
Definition: set.c:1096
void floatspan_set_intspan(const Span *s1, Span *s2)
Set the second span with the first one transformed to intspan.
Definition: span.c:821
void period_shift_tscale(Span *p, const Interval *shift, const Interval *duration)
Shift and/or scale a period by the intervals.
Definition: span.c:900
SpanSet * periodset_shift_tscale(const SpanSet *ps, const Interval *shift, const Interval *duration)
Return a period set shifted and/or scaled by the intervals.
Definition: spanset.c:485
double tfloat_min_value(const Temporal *temp)
Return the minimum value of a temporal float.
Definition: temporal.c:2188
bool * tbool_values(const Temporal *temp, int *count)
Return the the array of base values of a temporal boolean.
Definition: temporal.c:1860
bool tbool_end_value(const Temporal *temp)
Return the end value of a temporal boolean.
Definition: temporal.c:2095
text * ttext_start_value(const Temporal *temp)
Return the start value of a temporal text.
Definition: temporal.c:2046
uint32 temporal_hash(const Temporal *temp)
Return the 32-bit hash value of a temporal value.
Definition: temporal.c:4065
TSequence ** temporal_segments(const Temporal *temp, int *count)
Return the array of segments of a temporal value.
Definition: temporal.c:2435
TSequence * temporal_end_sequence(const Temporal *temp)
Return the end sequence of a temporal sequence (set).
Definition: temporal.c:2371
text ** ttext_values(const Temporal *temp, int *count)
Return the the array of base values of a temporal text.
Definition: temporal.c:1911
GSERIALIZED * tpoint_end_value(const Temporal *temp)
Return the end value of a temporal point.
Definition: temporal.c:2143
TSequence * temporal_start_sequence(const Temporal *temp)
Return the start sequence of a temporal sequence (set).
Definition: temporal.c:2351
int temporal_num_sequences(const Temporal *temp)
Return the number of sequences of a temporal sequence (set).
Definition: temporal.c:2336
double tfloat_end_value(const Temporal *temp)
Return the end value of a temporal float.
Definition: temporal.c:2119
const TInstant * temporal_start_instant(const Temporal *temp)
Return the start instant of a temporal value.
Definition: temporal.c:2474
int tint_min_value(const Temporal *temp)
Return the minimum value of a temporal integer.
Definition: temporal.c:2176
int * tint_values(const Temporal *temp, int *count)
Return the the array of base values of a temporal integer.
Definition: temporal.c:1877
int tint_end_value(const Temporal *temp)
Return the end value of a temporal integer.
Definition: temporal.c:2107
TSequence * temporal_sequence_n(const Temporal *temp, int i)
Return the n-th sequence of a temporal sequence (set).
Definition: temporal.c:2392
GSERIALIZED * tpoint_start_value(const Temporal *temp)
Return the start value of a temporal geometric point.
Definition: temporal.c:2058
SpanSet * temporal_time(const Temporal *temp)
Return the time frame of a temporal value as a period set.
Definition: temporal.c:1966
TSequence ** temporal_sequences(const Temporal *temp, int *count)
Return the array of sequences of a temporal sequence (set).
Definition: temporal.c:2416
SpanSet * tfloat_spanset(const Temporal *temp)
Return the base values of a temporal float as an array of spans.
Definition: temporal.c:1946
const TInstant * temporal_instant_n(const Temporal *temp, int n)
Return the n-th instant of a temporal value.
Definition: temporal.c:2524
const TInstant * temporal_end_instant(const Temporal *temp)
Return the end instant of a temporal value.
Definition: temporal.c:2498
TimestampTz temporal_start_timestamp(const Temporal *temp)
Return the start timestamp of a temporal value.
Definition: temporal.c:2594
int tint_start_value(const Temporal *temp)
Return the start value of a temporal integer.
Definition: temporal.c:2022
double * tfloat_values(const Temporal *temp, int *count)
Return the the array of base values of a temporal float.
Definition: temporal.c:1894
const TInstant * temporal_min_instant(const Temporal *temp)
Return a pointer to the instant with minimum base value of a temporal value.
Definition: temporal.c:2277
bool tbool_start_value(const Temporal *temp)
Return the start value of a temporal boolean.
Definition: temporal.c:2010
bool temporal_timestamp_n(const Temporal *temp, int n, TimestampTz *result)
Return the n-th distinct timestamp of a temporal value.
Definition: temporal.c:2635
text * ttext_min_value(const Temporal *temp)
Return the minimum value of a temporal text.
Definition: temporal.c:2200
Interval * temporal_duration(const Temporal *temp, bool boundspan)
Return the duration of a temporal value.
Definition: temporal.c:2317
GSERIALIZED ** tpoint_values(const Temporal *temp, int *count)
Return the the array of base values of a temporal geometric point.
Definition: temporal.c:1928
TimestampTz temporal_end_timestamp(const Temporal *temp)
Return the end timestamp of a temporal value.
Definition: temporal.c:2614
int temporal_num_timestamps(const Temporal *temp)
Return the number of distinct timestamps of a temporal value.
Definition: temporal.c:2574
const TInstant * temporal_max_instant(const Temporal *temp)
Return a pointer to the instant with maximum base value of a temporal value.
Definition: temporal.c:2297
int temporal_num_instants(const Temporal *temp)
Return the number of distinct instants of a temporal value.
Definition: temporal.c:2454
int tint_max_value(const Temporal *temp)
Return the maximum value of a temporal integer.
Definition: temporal.c:2235
const TInstant ** temporal_instants(const Temporal *temp, int *count)
Return the array of instants of a temporal value.
Definition: temporal.c:2554
double tfloat_max_value(const Temporal *temp)
Return the maximum value of a temporal float.
Definition: temporal.c:2247
text * ttext_max_value(const Temporal *temp)
Return the maximum value of a temporal text.
Definition: temporal.c:2259
double tfloat_start_value(const Temporal *temp)
Return the start value of a temporal float.
Definition: temporal.c:2034
char * temporal_interpolation(const Temporal *temp)
Return the string representation of the interpolation of a temporal value.
Definition: temporal.c:1798
text * ttext_end_value(const Temporal *temp)
Return the end value of a temporal text.
Definition: temporal.c:2131
TimestampTz * temporal_timestamps(const Temporal *temp, int *count)
Return the array of distinct timestamps of a temporal value.
Definition: temporal.c:2666
char * temporal_subtype(const Temporal *temp)
Return the string representation of the subtype of a temporal value.
Definition: temporal.c:1777
Temporal * temporal_tagg_finalfn(SkipList *state)
Generic final function for aggregating temporal values.
Definition: temporal_aggfuncs.c:606
SkipList * tint_tmin_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count of temporal values.
Definition: temporal_aggfuncs.c:653
GSERIALIZED * tpoint_twcentroid(const Temporal *temp)
Return the time-weighed centroid of a temporal geometry point.
Definition: tpoint_spatialfuncs.c:2520
double tnumber_integral(const Temporal *temp)
Return the integral (area under the curve) of a temporal number.
Definition: temporal.c:3777
SkipList * temporal_tcount_transfn(SkipList *state, const Temporal *temp)
Generic transition function for temporal aggregation.
Definition: temporal_aggfuncs.c:988
SkipList * tbool_tor_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count of temporal booleans.
Definition: temporal_aggfuncs.c:642
SkipList * tint_tsum_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count of temporal values.
Definition: temporal_aggfuncs.c:697
SkipList * tbool_tand_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal and of temporal booleans.
Definition: temporal_aggfuncs.c:631
Temporal * tnumber_tavg_finalfn(SkipList *state)
Final function for temporal average aggregation.
Definition: temporal_aggfuncs.c:1067
SkipList * ttext_tmax_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal max of temporal text values.
Definition: temporal_aggfuncs.c:742
SkipList * tfloat_tmin_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count of temporal values.
Definition: temporal_aggfuncs.c:664
SkipList * tint_tmax_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count of temporal values.
Definition: temporal_aggfuncs.c:675
SkipList * tfloat_tsum_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count of temporal values.
Definition: temporal_aggfuncs.c:708
SkipList * tnumber_tavg_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal average of temporal numbers.
Definition: temporal_aggfuncs.c:719
SkipList * tfloat_tmax_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count of temporal values.
Definition: temporal_aggfuncs.c:686
double tnumber_twavg(const Temporal *temp)
Return the time-weighted average of a temporal number.
Definition: temporal.c:3796
SkipList * ttext_tmin_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal min of temporal text values.
Definition: temporal_aggfuncs.c:731
Temporal * geo_to_tpoint(const GSERIALIZED *geo)
Converts the PostGIS trajectory geometry/geography where the M coordinates encode the timestamps in U...
Definition: tpoint_analytics.c:751
Temporal * temporal_simplify(const Temporal *temp, double eps_dist, bool synchronized)
Simplify the temporal float/point using a spatio-temporal extension of the Douglas-Peucker line simpl...
Definition: tpoint_analytics.c:1128
bool tpoint_to_geo_measure(const Temporal *tpoint, const Temporal *measure, bool segmentize, GSERIALIZED **result)
Construct a geometry/geography with M measure from the temporal point and.
Definition: tpoint_analytics.c:505
bool tpoint_AsMVTGeom(const Temporal *temp, const STBox *bounds, int32_t extent, int32_t buffer, bool clip_geom, GSERIALIZED **geom, int64 **timesarr, int *count)
Transform the temporal point to Mapbox Vector Tile format.
Definition: tpoint_analytics.c:1709
Temporal * tor_bool_tbool(bool b, const Temporal *temp)
Return the boolean or of a boolean and a temporal boolean.
Definition: tbool_boolops_meos.c:86
Temporal * tor_tbool_tbool(const Temporal *temp1, const Temporal *temp2)
Return the boolean or of the temporal booleans.
Definition: tbool_boolops_meos.c:108
Temporal * tand_tbool_tbool(const Temporal *temp1, const Temporal *temp2)
Return the boolean and of the temporal booleans.
Definition: tbool_boolops_meos.c:71
Temporal * tand_tbool_bool(const Temporal *temp, bool b)
Return the boolean and of a temporal boolean and a boolean.
Definition: tbool_boolops_meos.c:60
Temporal * tor_tbool_bool(const Temporal *temp, bool b)
Return the boolean or of a temporal boolean and a boolean.
Definition: tbool_boolops_meos.c:97
Temporal * tand_bool_tbool(bool b, const Temporal *temp)
Temporal Boolean operators: and, or, not.
Definition: tbool_boolops_meos.c:49
SpanSet * tbool_when_true(const Temporal *temp)
Return the time when the temporal boolean has value true.
Definition: tbool_boolops.c:139
Temporal * tnot_tbool(const Temporal *temp)
Return the boolean not of a temporal boolean.
Definition: tbool_boolops.c:83
Temporal * tfloat_to_tint(const Temporal *temp)
Cast a temporal float to a temporal integer.
Definition: temporal.c:1158
Span * temporal_to_period(const Temporal *temp)
Return the bounding period of a temporal value.
Definition: temporal.c:1197
Temporal * tint_to_tfloat(const Temporal *temp)
Cast a temporal integer to a temporal float.
Definition: temporal.c:1139
Span * tnumber_to_span(const Temporal *temp)
Return the value span of a temporal number.
Definition: temporal.c:1234
Temporal * teq_tbool_bool(const Temporal *temp, bool b)
Return the temporal equality of a temporal boolean and a boolean.
Definition: temporal_compops_meos.c:124
Temporal * tgt_float_tfloat(double d, const Temporal *temp)
Return the temporal greater than of a float and a temporal float.
Definition: temporal_compops_meos.c:568
Temporal * tne_ttext_text(const Temporal *temp, const text *txt)
Return the temporal inequality of a temporal text and a text.
Definition: temporal_compops_meos.c:323
Temporal * tge_text_ttext(const text *txt, const Temporal *temp)
Return the temporal greater than or equal to of a text and a temporal text.
Definition: temporal_compops_meos.c:670
Temporal * teq_point_tgeogpoint(const GSERIALIZED *gs, const Temporal *temp)
Return the temporal equality of a point and a temporal geographic point.
Definition: temporal_compops_meos.c:112
Temporal * tle_text_ttext(const text *txt, const Temporal *temp)
Return the temporal less or equal to than of a text and a temporal text.
Definition: temporal_compops_meos.c:490
Temporal * tge_float_tfloat(double d, const Temporal *temp)
Return the temporal greater than or equal to of a float and a temporal float.
Definition: temporal_compops_meos.c:657
Temporal * teq_bool_tbool(bool b, const Temporal *temp)
Temporal comparison operators: #=, #<>, #<, #>, #<=, #>=.
Definition: temporal_compops_meos.c:50
Temporal * tgt_tfloat_float(const Temporal *temp, double d)
Return the temporal greater than of a temporal float and a float.
Definition: temporal_compops_meos.c:604
Temporal * tge_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal greater than or equal of the temporal values.
Definition: temporal_compops_meos.c:721
bool temporal_lt(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is less than the second one.
Definition: temporal.c:4012
bool temporal_ne(const Temporal *temp1, const Temporal *temp2)
Return true if the temporal values are different.
Definition: temporal.c:3925
Temporal * teq_tint_int(const Temporal *temp, int i)
Return the temporal equality of a temporal integer and an integer.
Definition: temporal_compops_meos.c:136
Temporal * tge_ttext_text(const Temporal *temp, const text *txt)
Return the temporal greater than or equal to of a temporal text and a text.
Definition: temporal_compops_meos.c:709
Temporal * teq_ttext_text(const Temporal *temp, const text *txt)
Return the temporal equality of a temporal text and a text.
Definition: temporal_compops_meos.c:160
Temporal * tgt_ttext_text(const Temporal *temp, const text *txt)
Return the temporal greater than of a temporal text and a text.
Definition: temporal_compops_meos.c:616
Temporal * tgt_text_ttext(const text *txt, const Temporal *temp)
Return the temporal greater than of a text and a temporal text.
Definition: temporal_compops_meos.c:580
Temporal * teq_int_tint(int i, const Temporal *temp)
Return the temporal equality of an integer and a temporal integer.
Definition: temporal_compops_meos.c:62
Temporal * tne_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
Return the temporal difference of the temporal point and a point.
Definition: tpoint_meos.c:91
Temporal * tne_text_ttext(const text *txt, const Temporal *temp)
Return the temporal inequality of a text and a temporal text.
Definition: temporal_compops_meos.c:249
Temporal * tlt_float_tfloat(double d, const Temporal *temp)
Return the temporal less than of a float and a temporal float.
Definition: temporal_compops_meos.c:388
Temporal * teq_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal equality of the temporal values.
Definition: temporal_compops_meos.c:198
bool temporal_le(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is less than or equal to the second one.
Definition: temporal.c:4025
Temporal * tne_tgeompoint_point(const Temporal *temp, const GSERIALIZED *gs)
Return the temporal inequality of a temporal geometric point and a point.
Definition: temporal_compops_meos.c:336
Temporal * teq_tgeogpoint_point(const Temporal *temp, const GSERIALIZED *gs)
Return the temporal equality of a temporal geographic point and a point.
Definition: temporal_compops_meos.c:186
int temporal_cmp(const Temporal *temp1, const Temporal *temp2)
Return -1, 0, or 1 depending on whether the first temporal value is less than, equal,...
Definition: temporal.c:3941
Temporal * teq_float_tfloat(double d, const Temporal *temp)
Return the temporal equality of a float and a temporal float.
Definition: temporal_compops_meos.c:74
Temporal * tne_tgeogpoint_point(const Temporal *temp, const GSERIALIZED *gs)
Return the temporal inequality of a temporal geographic point and a point.
Definition: temporal_compops_meos.c:349
Temporal * tne_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
Return the temporal difference of a point and a temporal point.
Definition: tpoint_meos.c:80
Temporal * tle_tint_int(const Temporal *temp, int i)
Return the temporal less than or equal to of a temporal integer and an integer.
Definition: temporal_compops_meos.c:503
Temporal * teq_text_ttext(const text *txt, const Temporal *temp)
Return the temporal equality of a text and a temporal text.
Definition: temporal_compops_meos.c:86
bool temporal_gt(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is greater than the second one.
Definition: temporal.c:4050
Temporal * tle_float_tfloat(double d, const Temporal *temp)
Return the temporal less than or equal to of a float and a temporal float.
Definition: temporal_compops_meos.c:477
Temporal * tlt_int_tint(int i, const Temporal *temp)
Return the temporal less than of an integer and a temporal integer.
Definition: temporal_compops_meos.c:376
Temporal * tgt_int_tint(int i, const Temporal *temp)
Return the temporal greater than of an integer and a temporal integer.
Definition: temporal_compops_meos.c:556
bool temporal_ge(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is greater than or equal to the second one.
Definition: temporal.c:4038
Temporal * tlt_tint_int(const Temporal *temp, int i)
Return the temporal less than of a temporal integer and an integer.
Definition: temporal_compops_meos.c:412
Temporal * tne_point_tgeompoint(const GSERIALIZED *gs, const Temporal *temp)
Return the temporal inequality of a point and a temporal geometric point.
Definition: temporal_compops_meos.c:262
Temporal * tlt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal less than of the temporal values.
Definition: temporal_compops_meos.c:448
Temporal * teq_point_tgeompoint(const GSERIALIZED *gs, const Temporal *temp)
Return the temporal equality of a point and a temporal geometric point.
Definition: temporal_compops_meos.c:99
Temporal * tne_point_tgeogpoint(const GSERIALIZED *gs, const Temporal *temp)
Return the temporal inequality of a point and a temporal geographic point.
Definition: temporal_compops_meos.c:275
Temporal * tne_tfloat_float(const Temporal *temp, double d)
Return the temporal inequality of a temporal float and a float.
Definition: temporal_compops_meos.c:311
Temporal * tgt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal greater than of the temporal values.
Definition: temporal_compops_meos.c:628
bool temporal_eq(const Temporal *temp1, const Temporal *temp2)
Return true if the temporal values are equal.
Definition: temporal.c:3843
Temporal * tle_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal less than or equal to of the temporal values.
Definition: temporal_compops_meos.c:541
Temporal * tne_tbool_bool(const Temporal *temp, bool b)
Return the temporal inequality of a temporal boolean and a boolean.
Definition: temporal_compops_meos.c:287
Temporal * tne_int_tint(int i, const Temporal *temp)
Return the temporal inequality of an integer and a temporal integer.
Definition: temporal_compops_meos.c:225
Temporal * tle_ttext_text(const Temporal *temp, const text *txt)
Return the temporal less than or equal to of a temporal text and a text.
Definition: temporal_compops_meos.c:529
Temporal * tgt_tint_int(const Temporal *temp, int i)
Return the temporal greater than of a temporal integer and an integer.
Definition: temporal_compops_meos.c:592
Temporal * tne_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal inequality of the temporal values.
Definition: temporal_compops_meos.c:361
Temporal * teq_tfloat_float(const Temporal *temp, double d)
Return the temporal equality of a temporal float and a float.
Definition: temporal_compops_meos.c:148
Temporal * tne_tint_int(const Temporal *temp, int i)
Return the temporal inequality of a temporal integer and an integer.
Definition: temporal_compops_meos.c:299
Temporal * tlt_tfloat_float(const Temporal *temp, double d)
Return the temporal less than of a temporal float and a float.
Definition: temporal_compops_meos.c:424
Temporal * tge_int_tint(int i, const Temporal *temp)
Return the temporal greater than or equal to of an integer and a temporal integer.
Definition: temporal_compops_meos.c:644
Temporal * tle_tfloat_float(const Temporal *temp, double d)
Return the temporal less than or equal to of a temporal float and a float.
Definition: temporal_compops_meos.c:516
Temporal * tlt_text_ttext(const text *txt, const Temporal *temp)
Return the temporal less than of a text and a temporal text.
Definition: temporal_compops_meos.c:400
Temporal * tlt_ttext_text(const Temporal *temp, const text *txt)
Return the temporal less than of a temporal text and a text.
Definition: temporal_compops_meos.c:436
Temporal * tge_tint_int(const Temporal *temp, int i)
Return the temporal greater than or equal to of a temporal integer and an integer.
Definition: temporal_compops_meos.c:683
Temporal * teq_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
Return the temporal equality of a temporal point and a point.
Definition: tpoint_meos.c:69
Temporal * tne_float_tfloat(double d, const Temporal *temp)
Return the temporal inequality of a float and a temporal float.
Definition: temporal_compops_meos.c:237
Temporal * tle_int_tint(int i, const Temporal *temp)
Return the temporal less than or equal to of an integer and a temporal integer.
Definition: temporal_compops_meos.c:464
Temporal * tne_bool_tbool(bool b, const Temporal *temp)
Return the temporal inequality of a boolean and a temporal boolean.
Definition: temporal_compops_meos.c:213
Temporal * teq_tgeompoint_point(const Temporal *temp, const GSERIALIZED *gs)
Return the temporal equality of a temporal geometric point and a point.
Definition: temporal_compops_meos.c:173
Temporal * teq_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
General functions for temporal points.
Definition: tpoint_meos.c:58
Temporal * tge_tfloat_float(const Temporal *temp, double d)
Return the temporal greater than or equal to of a temporal float and a float.
Definition: temporal_compops_meos.c:696
TSequenceSet * tboolseqset_from_base(bool b, const TSequenceSet *ss)
Construct a temporal boolean sequence set from a boolean and the time frame of another temporal seque...
Definition: tsequenceset.c:487
Temporal * tgeompoint_from_base(const GSERIALIZED *gs, const Temporal *temp, interpType interp)
Construct a temporal geometric point from a point and the time frame of another temporal value.
Definition: temporal.c:811
TSequenceSet * ttextseqset_from_base(const text *txt, const TSequenceSet *ss)
Construct a temporal text sequence set from a text and the time frame of another temporal sequence se...
Definition: tsequenceset.c:520
TSequenceSet * tboolseqset_from_base_time(bool b, const SpanSet *ps)
Construct a temporal boolean sequence set from a boolean and a period set.
Definition: tsequenceset.c:581
TInstant * tboolinst_make(bool b, TimestampTz t)
Construct a temporal instant boolean from the arguments.
Definition: tinstant.c:332
TSequence * ttextseq_from_base_time(const text *txt, const Span *p)
Construct a temporal text sequence from a text and a period.
Definition: tsequence.c:1303
TInstant * tfloatinst_make(double d, TimestampTz t)
Construct a temporal instant float from the arguments.
Definition: tinstant.c:354
TSequence * ttextseq_from_base(const text *txt, const TSequence *seq)
Construct a temporal text sequence from a text and the time frame of another temporal sequence.
Definition: tsequence.c:1206
TSequenceSet * tsequenceset_make_free(TSequence **sequences, int count, bool normalize)
Construct a temporal sequence set from an array of temporal sequences and free the array and the sequ...
Definition: tsequenceset.c:332
TSequenceSet * tsequenceset_make(const TSequence **sequences, int count, bool normalize)
Construct a temporal sequence set from an array of temporal sequences.
Definition: tsequenceset.c:316
TSequenceSet * tintseqset_from_base(int i, const TSequenceSet *ss)
Construct a temporal integer sequence set from an integer and the time frame of another temporal sequ...
Definition: tsequenceset.c:498
TSequence * tgeogpointseq_from_base_time(const GSERIALIZED *gs, const Span *p, interpType interp)
Construct a temporal geographic point sequence from a point and a period.
Definition: tsequence.c:1326
TSequence * tfloatseq_from_base(double d, const TSequence *seq, interpType interp)
Construct a temporal float sequence from a float and the time frame of another temporal sequence.
Definition: tsequence.c:1195
TSequenceSet * tsequenceset_make_exp(const TSequence **sequences, int count, int maxcount, bool normalize)
Construct a temporal sequence set from an array of temporal sequences.
Definition: tsequenceset.c:297
TSequenceSet * tsequenceset_make_gaps(const TInstant **instants, int count, interpType interp, float maxdist, Interval *maxt)
Construct a temporal sequence set from an array of temporal instants introducing a gap when two conse...
Definition: tsequenceset.c:375
TSequence * tsequence_make(const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Construct a temporal sequence from an array of temporal instants.
Definition: tsequence.c:937
TSequence * tbooldiscseq_from_base_time(bool b, const Set *ts)
Construct a temporal boolean discrete sequence from a boolean and a timestamp set.
Definition: tsequence.c:1084
Temporal * tfloat_from_base(double d, const Temporal *temp, interpType interp)
Construct a temporal float from a float and the time frame of another temporal value.
Definition: temporal.c:789
Temporal * tgeogpoint_from_base(const GSERIALIZED *gs, const Temporal *temp, interpType interp)
Construct a temporal geographic point from a point and the time frame of another temporal value.
Definition: temporal.c:822
TInstant * tgeompointinst_make(const GSERIALIZED *gs, TimestampTz t)
Construct a temporal instant geometric point from the arguments.
Definition: tinstant.c:376
TSequence * tpointseq_make_coords(const double *xcoords, const double *ycoords, const double *zcoords, const TimestampTz *times, int count, int32 srid, bool geodetic, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Construct a temporal sequence from arrays of coordinates, one per dimension, and timestamps.
Definition: tsequence.c:1009
TSequence * tgeogpointdiscseq_from_base_time(const GSERIALIZED *gs, const Set *ts)
Construct a temporal geographic point discrete sequence from a point and a timestamp set.
Definition: tsequence.c:1139
TSequenceSet * ttextseqset_from_base_time(const text *txt, const SpanSet *ps)
Construct a temporal text sequence set from a text and a period set.
Definition: tsequenceset.c:612
TSequence * ttextdiscseq_from_base_time(const text *txt, const Set *ts)
Construct a temporal text discrete sequence from a text and a timestamp set.
Definition: tsequence.c:1117
TSequence * tintseq_from_base(int i, const TSequence *seq)
Construct a temporal integer sequence from an integer and the time frame of another temporal sequence...
Definition: tsequence.c:1184
TSequence * tgeompointseq_from_base_time(const GSERIALIZED *gs, const Span *p, interpType interp)
Construct a temporal geometric point sequence from a point and a period.
Definition: tsequence.c:1314
Temporal * tbool_from_base(bool b, const Temporal *temp)
Construct a temporal boolean from a boolean and the time frame of another temporal value.
Definition: temporal.c:767
TSequenceSet * tgeogpointseqset_from_base_time(const GSERIALIZED *gs, const SpanSet *ps, interpType interp)
Construct a temporal geographic point sequence set from a point and a period set.
Definition: tsequenceset.c:636
Temporal * ttext_from_base(const text *txt, const Temporal *temp)
Construct a temporal text from a text and the time frame of another temporal value.
Definition: temporal.c:800
Temporal * tint_from_base(int i, const Temporal *temp)
Construct a temporal integer from an integer and the time frame of another temporal value.
Definition: temporal.c:778
TSequence * tgeompointseq_from_base(const GSERIALIZED *gs, const TSequence *seq, interpType interp)
Construct a temporal geometric point sequence from a point and the time frame of another temporal seq...
Definition: tsequence.c:1217
TSequence * tboolseq_from_base_time(bool b, const Span *p)
Construct a temporal boolean sequence from a boolean and a period.
Definition: tsequence.c:1273
Temporal * temporal_copy(const Temporal *temp)
Return a copy of a temporal value.
Definition: temporal.c:730
TSequenceSet * tfloatseqset_from_base(double d, const TSequenceSet *ss, interpType interp)
Construct a temporal float sequence set from a float and the time frame of another temporal sequence ...
Definition: tsequenceset.c:509
TSequenceSet * tgeogpointseqset_from_base(const GSERIALIZED *gs, const TSequenceSet *ss, interpType interp)
Construct a temporal geographic point sequence set from a point and the time frame of another tempora...
Definition: tsequenceset.c:543
TSequence * tfloatseq_from_base_time(double d, const Span *p, interpType interp)
Construct a temporal float sequence from a float and a period.
Definition: tsequence.c:1293
TInstant * tgeogpointinst_make(const GSERIALIZED *gs, TimestampTz t)
Construct a temporal instant geographic point from the arguments.
Definition: tinstant.c:386
TSequence * tintseq_from_base_time(int i, const Span *p)
Construct a temporal integer sequence from an integer and a period.
Definition: tsequence.c:1283
TSequence * tboolseq_from_base(bool b, const TSequence *seq)
Construct a temporal boolean sequence from a boolean and the time frame of another temporal sequence.
Definition: tsequence.c:1173
TSequenceSet * tgeompointseqset_from_base(const GSERIALIZED *gs, const TSequenceSet *ss, interpType interp)
Construct a temporal geometric point sequence set from a point and the time frame of another temporal...
Definition: tsequenceset.c:531
TSequence * tsequence_make_free(TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Construct a temporal sequence from an array of temporal instants and free the array and the instants ...
Definition: tsequence.c:984
TSequence * tfloatdiscseq_from_base_time(double d, const Set *ts)
Construct a temporal float discrete sequence from a float and a timestamp set.
Definition: tsequence.c:1106
TSequence * tintdiscseq_from_base_time(int i, const Set *ts)
Construct a temporal integer discrete sequence from an integer and a timestamp set.
Definition: tsequence.c:1095
TSequenceSet * tgeompointseqset_from_base_time(const GSERIALIZED *gs, const SpanSet *ps, interpType interp)
Construct a temporal geometric point sequence set from a point and a period set.
Definition: tsequenceset.c:623
TSequence * tgeompointdiscseq_from_base_time(const GSERIALIZED *gs, const Set *ts)
Construct a temporal geometric point discrete sequence from a point and a timestamp set.
Definition: tsequence.c:1128
TSequenceSet * tintseqset_from_base_time(int i, const SpanSet *ps)
Construct a temporal integer sequence set from an integer and a period set.
Definition: tsequenceset.c:592
TInstant * tintinst_make(int i, TimestampTz t)
Construct a temporal instant integer from the arguments.
Definition: tinstant.c:343
TInstant * ttextinst_make(const text *txt, TimestampTz t)
Construct a temporal instant text from the arguments.
Definition: tinstant.c:365
TSequenceSet * tfloatseqset_from_base_time(double d, const SpanSet *ps, interpType interp)
Construct a temporal float sequence set from a float and a period set.
Definition: tsequenceset.c:602
TSequence * tgeogpointseq_from_base(const GSERIALIZED *gs, const TSequence *seq, interpType interp)
Construct a temporal geographic point sequence from a point and the time frame of another temporal se...
Definition: tsequence.c:1229
TInstant * nai_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach instant between the temporal points.
Definition: tpoint_distance.c:695
TInstant * nai_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the nearest approach instant between a temporal point and a geometry.
Definition: tpoint_distance.c:665
double nad_tfloat_float(const Temporal *temp, double d)
Return the nearest approach distance between a temporal number and a number.
Definition: tnumber_distance.c:238
double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance between two temporal floats.
Definition: tnumber_distance.c:348
Temporal * distance_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2)
Return the temporal distance between two temporal points.
Definition: tpoint_distance.c:418
bool shortestline_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, GSERIALIZED **result)
Return the line connecting the nearest approach point between a temporal point and a geometry.
Definition: tpoint_distance.c:865
double nad_stbox_geo(const STBox *box, const GSERIALIZED *gs)
Return the nearest approach distance between a spatiotemporal box and a geometry.
Definition: tpoint_distance.c:745
double nad_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the nearest approach distance between a temporal point and a geometry.
Definition: tpoint_distance.c:725
Temporal * distance_tint_int(const Temporal *temp, int i)
Return the temporal distance between a temporal integer and an integer.
Definition: tnumber_distance.c:114
Temporal * distance_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo)
Return the temporal distance between a temporal point and a geometry/geography point.
Definition: tpoint_distance.c:388
int nad_tint_int(const Temporal *temp, int i)
Return the nearest approach distance between a temporal number and a number.
Definition: tnumber_distance.c:225
bool shortestline_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, GSERIALIZED **result)
Return the line connecting the nearest approach point between the temporal points.
Definition: tpoint_distance.c:896
double nad_tpoint_stbox(const Temporal *temp, const STBox *box)
Return the nearest approach distance between a temporal point and a spatio-temporal box.
Definition: tpoint_distance.c:800
double nad_tnumber_tbox(const Temporal *temp, const TBox *box)
Return the nearest approach distance between a temporal number and a temporal box.
Definition: tnumber_distance.c:280
Temporal * distance_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return the temporal distance between two temporal numbers.
Definition: tnumber_distance.c:187
double nad_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance between the temporal points.
Definition: tpoint_distance.c:841
int nad_tint_tint(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance between two temporal integers.
Definition: tnumber_distance.c:336
double nad_stbox_stbox(const STBox *box1, const STBox *box2)
Return the nearest approach distance between the spatio-temporal boxes.
Definition: tpoint_distance.c:765
double nad_tbox_tbox(const TBox *box1, const TBox *box2)
Return the nearest approach distance between the temporal boxes.
Definition: tnumber_distance.c:250
Temporal * distance_tfloat_float(const Temporal *temp, double d)
Return the temporal distance between a temporal float and a float.
Definition: tnumber_distance.c:125
bool tint_ever_le(const Temporal *temp, int i)
Return true if a temporal integer is ever less than or equal to an integer.
Definition: temporal.c:3002
bool ttext_always_le(const Temporal *temp, text *txt)
Return true if a temporal text is always less than or equal to a text.
Definition: temporal.c:3074
bool ttext_always_lt(const Temporal *temp, text *txt)
Return true if a temporal text is always less than a text.
Definition: temporal.c:2971
bool tfloat_always_lt(const Temporal *temp, double d)
Return true if a temporal float is always less than a float.
Definition: temporal.c:2961
bool tgeompoint_always_eq(const Temporal *temp, GSERIALIZED *gs)
Return true if a temporal geometric point is always equal to a point.
Definition: tpoint_spatialfuncs.c:913
bool tfloat_ever_eq(const Temporal *temp, double d)
Return true if a temporal float is ever equal to a float.
Definition: temporal.c:2801
bool tgeompoint_ever_eq(const Temporal *temp, GSERIALIZED *gs)
Return true if a temporal geometric point is ever equal to a point.
Definition: tpoint_spatialfuncs.c:811
bool tfloat_ever_le(const Temporal *temp, double d)
Return true if a temporal float is ever less than or equal to a float.
Definition: temporal.c:3013
bool tint_ever_lt(const Temporal *temp, int i)
Return true if a temporal integer is ever less than an integer.
Definition: temporal.c:2901
bool tfloat_ever_lt(const Temporal *temp, double d)
Return true if a temporal float is ever less than a float.
Definition: temporal.c:2911
bool ttext_ever_eq(const Temporal *temp, text *txt)
Return true if a temporal text is ever equal to a text.
Definition: temporal.c:2811
bool ttext_always_eq(const Temporal *temp, text *txt)
Return true if a temporal text is always equal to a text.
Definition: temporal.c:2871
bool tfloat_always_le(const Temporal *temp, double d)
Return true if a temporal float is always less than or equal to a float.
Definition: temporal.c:3064
bool tbool_always_eq(const Temporal *temp, bool b)
Return true if a temporal boolean is always equal to a boolean.
Definition: temporal.c:2841
bool tbool_ever_eq(const Temporal *temp, bool b)
Return true if a temporal boolean is ever equal to a boolean.
Definition: temporal.c:2781
bool ttext_ever_lt(const Temporal *temp, text *txt)
Return true if a temporal text is ever less than a text.
Definition: temporal.c:2921
bool tint_ever_eq(const Temporal *temp, int i)
Return true if a temporal integer is ever equal to an integer.
Definition: temporal.c:2791
bool tgeogpoint_always_eq(const Temporal *temp, GSERIALIZED *gs)
Return true if a temporal geographic point is always equal to a point.
Definition: tpoint_spatialfuncs.c:923
bool tint_always_lt(const Temporal *temp, int i)
Return true if a temporal integer is always less than an integer.
Definition: temporal.c:2951
bool tfloat_always_eq(const Temporal *temp, double d)
Return true if a temporal float is always equal to a float.
Definition: temporal.c:2861
bool tint_always_eq(const Temporal *temp, int i)
Return true if a temporal integer is always equal to an integer.
Definition: temporal.c:2851
bool tgeogpoint_ever_eq(const Temporal *temp, GSERIALIZED *gs)
Return true if a temporal geographic point is ever equal to a point.
Definition: tpoint_spatialfuncs.c:822
bool ttext_ever_le(const Temporal *temp, text *txt)
Return true if a temporal text is ever less than or equal to a text.
Definition: temporal.c:3023
bool tint_always_le(const Temporal *temp, int i)
Return true if a temporal integer is always less than or equal to an integer.
Definition: temporal.c:3054
char * temporal_as_mfjson(const Temporal *temp, bool with_bbox, int flags, int precision, char *srs)
Return the MF-JSON representation of a temporal value.
Definition: type_out.c:996
Temporal * temporal_from_mfjson(const char *mfjson)
Return a temporal point from its MF-JSON representation.
Definition: type_in.c:693
Temporal * temporal_from_hexwkb(const char *hexwkb)
Return a temporal value from its HexEWKB representation.
Definition: type_in.c:1742
char * tbool_out(const Temporal *temp)
Return a temporal boolean from its Well-Known Text (WKT) representation.
Definition: temporal.c:673
Temporal * tgeogpoint_in(const char *str)
Return a temporal geographic point from its Well-Known Text (WKT) representation.
Definition: temporal.c:642
Temporal * tgeompoint_in(const char *str)
Return a temporal geometric point from its Well-Known Text (WKT) representation.
Definition: temporal.c:632
Temporal * ttext_in(const char *str)
Return a temporal text from its Well-Known Text (WKT) representation.
Definition: temporal.c:621
Temporal * tbool_in(const char *str)
Return a temporal boolean from its Well-Known Text (WKT) representation.
Definition: temporal.c:590
char * tpoint_out(const Temporal *temp, int maxdd)
Return a temporal geometric/geographic point from its Well-Known Text (WKT) representation.
Definition: temporal.c:715
char * tint_out(const Temporal *temp)
Return a temporal integer from its Well-Known Text (WKT) representation.
Definition: temporal.c:684
uint8_t * temporal_as_wkb(const Temporal *temp, uint8_t variant, size_t *size_out)
Return the WKB representation of a temporal value.
Definition: type_out.c:2452
Temporal * temporal_from_wkb(const uint8_t *wkb, int size)
Return a temporal value from its Well-Known Binary (WKB) representation.
Definition: type_in.c:1729
char * temporal_as_hexwkb(const Temporal *temp, uint8_t variant, size_t *size_out)
Return the WKB representation of a temporal value in hex-encoded ASCII.
Definition: type_out.c:2466
char * ttext_out(const Temporal *temp)
Return a temporal text from its Well-Known Text (WKT) representation.
Definition: temporal.c:704
Temporal * tfloat_in(const char *str)
Return a temporal float from its Well-Known Text (WKT) representation.
Definition: temporal.c:611
Temporal * tint_in(const char *str)
Return a temporal integer from its Well-Known Text (WKT) representation.
Definition: temporal.c:601
char * tpoint_as_text(const Temporal *temp, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal point.
Definition: tpoint_out.c:96
char * tfloat_out(const Temporal *temp, int maxdd)
Return a temporal float from its Well-Known Text (WKT) representation.
Definition: temporal.c:694
char * tpoint_as_ewkt(const Temporal *temp, int maxdd)
Return the Extended Well-Known Text (EWKT) representation a temporal point.
Definition: tpoint_out.c:116
Temporal * sub_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal subtraction of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:166
Temporal * add_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal addition of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:103
Temporal * sub_tfloat_float(const Temporal *tnumber, double d)
Return the temporal subtraction of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:154
Temporal * add_int_tint(int i, const Temporal *tnumber)
Mathematical operators (+, -, *, /) and functions (round, degrees, ...) for temporal numbers.
Definition: tnumber_mathfuncs_meos.c:55
Temporal * sub_tint_int(const Temporal *tnumber, int i)
Return the temporal subtraction of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:142
Temporal * div_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal division of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:293
Temporal * add_float_tfloat(double d, const Temporal *tnumber)
Return the temporal addition of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:67
Temporal * sub_float_tfloat(double d, const Temporal *tnumber)
Return the temporal subtraction of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:130
Temporal * add_tfloat_float(const Temporal *tnumber, double d)
Return the temporal addition of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:91
Temporal * div_int_tint(int i, const Temporal *tnumber)
Return the temporal division of an integer and a temporal integer.
Definition: tnumber_mathfuncs_meos.c:245
Temporal * mult_int_tint(int i, const Temporal *tnumber)
Return the temporal multiplication of an integer and a temporal integer.
Definition: tnumber_mathfuncs_meos.c:181
Temporal * tnumber_abs(const Temporal *temp)
Get the absolute value of a temporal number.
Definition: tnumber_mathfuncs.c:368
Temporal * mult_tfloat_float(const Temporal *tnumber, double d)
Return the temporal multiplication of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:217
Temporal * div_tint_int(const Temporal *tnumber, int i)
Return the temporal division of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:269
Temporal * tfloat_radians(const Temporal *temp)
Convert a temporal number from degrees to radians.
Definition: tnumber_mathfuncs.c:415
Temporal * tfloat_derivative(const Temporal *temp)
Return the derivative of a temporal number.
Definition: tnumber_mathfuncs.c:503
Temporal * mult_float_tfloat(double d, const Temporal *tnumber)
Return the temporal multiplication of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:193
Temporal * sub_int_tint(int i, const Temporal *tnumber)
Return the temporal subtraction of an integer and a temporal integer.
Definition: tnumber_mathfuncs_meos.c:118
Temporal * div_float_tfloat(double d, const Temporal *tnumber)
Return the temporal division of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:257
Temporal * mult_tint_int(const Temporal *tnumber, int i)
Return the temporal multiplication of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:205
Temporal * tfloat_degrees(const Temporal *temp)
Convert a temporal number from radians to degrees.
Definition: tnumber_mathfuncs.c:393
Temporal * div_tfloat_float(const Temporal *tnumber, double d)
Return the temporal division of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:281
Temporal * mult_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal multiplication of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:229
Temporal * add_tint_int(const Temporal *tnumber, int i)
Return the temporal addition of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:79
Temporal * temporal_delete_timestampset(const Temporal *temp, const Set *ts, bool connect)
Delete a timestamp set from a temporal value connecting the instants before and after the given times...
Definition: temporal.c:3671
Temporal * temporal_delete_periodset(const Temporal *temp, const SpanSet *ps, bool connect)
Delete a period set from a temporal value connecting the instants before and after the given timestam...
Definition: temporal.c:3739
Temporal * temporal_delete_period(const Temporal *temp, const Span *p, bool connect)
Delete a period from a temporal value connecting the instants before and after the given timestamp (i...
Definition: temporal.c:3706
Temporal * temporal_delete_timestamp(const Temporal *temp, TimestampTz t, bool connect)
Delete a timestamp from a temporal value connecting the instants before and after the given timestamp...
Definition: temporal.c:3638
Temporal * tpoint_minus_stbox(const Temporal *temp, const STBox *box)
Restrict a temporal point to the complement of a spatiotemporal box.
Definition: tpoint_spatialfuncs.c:4492
Temporal * temporal_at_period(const Temporal *temp, const Span *p)
Restrict a temporal value to a period.
Definition: temporal_meos.c:434
Temporal * tint_at_value(const Temporal *temp, int i)
Restrict a temporal integer to an integer.
Definition: temporal_meos.c:64
Temporal * temporal_minus_period(const Temporal *temp, const Span *p)
Restrict a temporal value to the complement of a period.
Definition: temporal_meos.c:446
Temporal * tpoint_minus_value(const Temporal *temp, GSERIALIZED *gs)
Restrict a temporal point to the complement of a point.
Definition: temporal_meos.c:160
Temporal * tfloat_at_value(const Temporal *temp, double d)
Restrict a temporal float to a float.
Definition: temporal_meos.c:76
Temporal * tint_minus_value(const Temporal *temp, int i)
Restrict a temporal integer to the complement of an integer.
Definition: temporal_meos.c:124
Temporal * tbool_minus_value(const Temporal *temp, bool b)
Restrict a temporal boolean to the complement of a boolean.
Definition: temporal_meos.c:112
Temporal * tnumber_minus_spanset(const Temporal *temp, const SpanSet *ss)
Restrict a temporal value to the complement of an array of spans of base values.
Definition: temporal_meos.c:372
bool tbool_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, bool *value)
Return the value of a temporal boolean at a timestamp.
Definition: temporal_meos.c:198
Temporal * temporal_at_timestampset(const Temporal *temp, const Set *ts)
Restrict a temporal value to a timestamp set.
Definition: temporal_meos.c:410
Temporal * temporal_at_periodset(const Temporal *temp, const SpanSet *ps)
Restrict a temporal value to a period set.
Definition: temporal_meos.c:458
bool tfloat_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, double *value)
Return the value of a temporal integer at a timestamp.
Definition: temporal_meos.c:232
Temporal * temporal_minus_timestamp(const Temporal *temp, TimestampTz t)
Restrict a temporal value to the complement of a timestamp.
Definition: temporal_meos.c:398
Temporal * tnumber_minus_span(const Temporal *temp, const Span *span)
Restrict a temporal value to the complement of a span of base values.
Definition: temporal_meos.c:347
Temporal * tpoint_at_value(const Temporal *temp, GSERIALIZED *gs)
Restrict a temporal point to a point.
Definition: temporal_meos.c:100
Temporal * temporal_at_max(const Temporal *temp)
Restrict a temporal value to its maximum base value.
Definition: temporal_meos.c:309
Temporal * tbool_at_value(const Temporal *temp, bool b)
Basic functions for temporal types of any subtype.
Definition: temporal_meos.c:52
Temporal * ttext_minus_value(const Temporal *temp, text *txt)
Restrict a temporal text to the complement of a text.
Definition: temporal_meos.c:148
Temporal * temporal_minus_periodset(const Temporal *temp, const SpanSet *ps)
Restrict a temporal value to the complement of a period set.
Definition: temporal_meos.c:470
Temporal * temporal_minus_min(const Temporal *temp)
Restrict a temporal value to the complement of its minimum base value.
Definition: temporal_meos.c:297
Temporal * temporal_minus_timestampset(const Temporal *temp, const Set *ts)
Restrict a temporal value to the complement of a timestamp set.
Definition: temporal_meos.c:422
Temporal * tnumber_at_tbox(const Temporal *temp, const TBox *box)
Restrict a temporal number to a temporal box.
Definition: temporal.c:3506
Temporal * tnumber_at_span(const Temporal *temp, const Span *span)
Restrict a temporal value to a span of base values.
Definition: temporal_meos.c:335
bool ttext_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, text **value)
Return the value of a temporal integer at a timestamp.
Definition: temporal_meos.c:249
Temporal * tpoint_at_stbox(const Temporal *temp, const STBox *box)
Restrict a temporal point to a spatiotemporal box.
Definition: tpoint_spatialfuncs.c:4480
Temporal * tfloat_minus_value(const Temporal *temp, double d)
Restrict a temporal float to the complement of a float.
Definition: temporal_meos.c:136
Temporal * temporal_minus_max(const Temporal *temp)
Restrict a temporal value to the complement of its maximum base value.
Definition: temporal_meos.c:321
bool tint_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, int *value)
Return the value of a temporal integer at a timestamp.
Definition: temporal_meos.c:215
Temporal * temporal_at_timestamp(const Temporal *temp, TimestampTz t)
Restrict a temporal value to a timestamp.
Definition: temporal_meos.c:386
Temporal * tpoint_at_geometry(const Temporal *temp, const GSERIALIZED *gs)
Restrict a temporal point to (the complement of) a geometry.
Definition: tpoint_spatialfuncs.c:4230
Temporal * tnumber_at_spanset(const Temporal *temp, const SpanSet *ss)
Restrict a temporal value to an array of spans of base values.
Definition: temporal_meos.c:359
Temporal * tpoint_minus_geometry(const Temporal *temp, const GSERIALIZED *gs)
Restrict a temporal point to (the complement of) a geometry.
Definition: tpoint_spatialfuncs.c:4242
Temporal * ttext_at_value(const Temporal *temp, text *txt)
Restrict a temporal text to a text.
Definition: temporal_meos.c:88
Temporal * tnumber_minus_tbox(const Temporal *temp, const TBox *box)
Restrict a temporal number to the complement of a temporal box.
Definition: temporal.c:3548
Temporal * temporal_at_min(const Temporal *temp)
Restrict a temporal value to its minimum base value.
Definition: temporal_meos.c:285
bool tpoint_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, GSERIALIZED **value)
Return the value of a temporal geometric point at a timestamp.
Definition: temporal_meos.c:266
double temporal_dyntimewarp_distance(const Temporal *temp1, const Temporal *temp2)
Compute the Dynamic Time Warp distance between two temporal values.
Definition: temporal_similarity.c:224
double temporal_frechet_distance(const Temporal *temp1, const Temporal *temp2)
Compute the Frechet distance between two temporal values.
Definition: temporal_similarity.c:212
Match * temporal_frechet_path(const Temporal *temp1, const Temporal *temp2, int *count)
Compute the Frechet distance between two temporal values.
Definition: temporal_similarity.c:453
Match * temporal_dyntimewarp_path(const Temporal *temp1, const Temporal *temp2, int *count)
Compute the Dynamic Time Warp distance between two temporal values.
Definition: temporal_similarity.c:466
double tpoint_length(const Temporal *temp)
Return the length traversed by a temporal sequence (set) point.
Definition: tpoint_spatialfuncs.c:2235
Temporal * tpoint_speed(const Temporal *temp)
Return the speed of a temporal point.
Definition: tpoint_spatialfuncs.c:2405
GSERIALIZED * tpoint_trajectory(const Temporal *temp)
Return the trajectory of a temporal point.
Definition: tpoint_spatialfuncs.c:1782
Temporal * tpoint_get_coord(const Temporal *temp, int coord)
Get one of the coordinates of a temporal point as a temporal float.
Definition: tpoint_spatialfuncs.c:2115
STBox * tpoint_stboxes(const Temporal *temp, int *count)
Return an array of spatiotemporal boxes from a temporal point.
Definition: tpoint_boxops.c:375
bool bearing_point_point(const GSERIALIZED *geo1, const GSERIALIZED *geo2, double *result)
Return the temporal bearing between two geometry/geography points.
Definition: tpoint_spatialfuncs.c:2918
Temporal * tpoint_cumulative_length(const Temporal *temp)
Return the cumulative length traversed by a temporal point.
Definition: tpoint_spatialfuncs.c:2320
int tpoint_srid(const Temporal *temp)
Return the SRID of a temporal point.
Definition: tpoint_spatialfuncs.c:1843
bool tpoint_is_simple(const Temporal *temp)
Return true if a temporal point does not self-intersect.
Definition: tpoint_spatialfuncs.c:3330
Temporal * bearing_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2)
Return the temporal bearing between two temporal points.
Definition: tpoint_spatialfuncs.c:2969
Temporal * bearing_tpoint_point(const Temporal *temp, const GSERIALIZED *gs, bool invert)
Return the temporal bearing between a temporal point and a geometry/geography point.
Definition: tpoint_spatialfuncs.c:2939
Temporal * tpoint_azimuth(const Temporal *temp)
Return the temporal azimuth of a temporal geometry point.
Definition: tpoint_spatialfuncs.c:2675
Temporal * tdwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist, bool restr, bool atvalue)
Return a temporal Boolean that states whether the temporal points are within the given distance.
Definition: tpoint_tempspatialrels.c:1264
Temporal * tcontains_geo_tpoint(const GSERIALIZED *gs, const Temporal *temp, bool restr, bool atvalue)
Return the temporal contains relationship between a geometry and a temporal point.
Definition: tpoint_tempspatialrels.c:1082
Temporal * tintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo, bool restr, bool atvalue)
Return the temporal intersects relationship between a temporal point and a geometry.
Definition: tpoint_tempspatialrels_meos.c:103
int edwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist)
Return 1 if the temporal points are ever within the given distance, 0 if not, -1 if the temporal poin...
Definition: tpoint_spatialrels.c:677
Temporal * tdwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist, bool restr, bool atvalue)
Return a temporal Boolean that states whether a temporal point and a geometry are within the given di...
Definition: tpoint_tempspatialrels.c:1165
int edisjoint_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2)
Ever spatial relationships for temporal points.
Definition: tpoint_spatialrels_meos.c:70
int edisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return 1 if a temporal point and a geometry are ever disjoint, 0 if not, and -1 if the geometry is em...
Definition: tpoint_spatialrels.c:413
int etouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return 1 if a temporal point and a geometry ever touch, 0 if not, and -1 if the geometry is empty.
Definition: tpoint_spatialrels.c:467
int eintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return 1 if a geometry and a temporal point ever intersect, 0 if not, and -1 if the geometry is empty...
Definition: tpoint_spatialrels.c:444
int eintersects_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2)
Return 1 if the temporal points ever intersect, 0 if not, and -1 if the temporal points do not inters...
Definition: tpoint_spatialrels_meos.c:87
Temporal * ttouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, bool restr, bool atvalue)
Return the temporal touches relationship between a geometry and a temporal point.
Definition: tpoint_tempspatialrels.c:1126
int edwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist)
Return 1 if a geometry and a temporal point are ever within the given distance, 0 if not,...
Definition: tpoint_spatialrels.c:500
int econtains_geo_tpoint(const GSERIALIZED *geo, const Temporal *temp)
Return 1 if a geometry ever contains a temporal point, 0 if not, and -1 if the geometry is empty.
Definition: tpoint_spatialrels.c:335
Temporal * tdisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo, bool restr, bool atvalue)
Temporal spatial relationships for temporal points.
Definition: tpoint_tempspatialrels_meos.c:85
Temporal * tpoint_set_srid(const Temporal *temp, int32 srid)
Set the SRID of a temporal point.
Definition: tpoint_spatialfuncs.c:1934
STBox * geo_expand_space(const GSERIALIZED *gs, double d)
Return the bounding box of a temporal point expanded on the spatial dimension.
Definition: tpoint.c:91
STBox * tpoint_expand_space(const Temporal *temp, double d)
Return the bounding box of a temporal point expanded on the spatial dimension.
Definition: tpoint.c:108
Temporal * tgeompoint_tgeogpoint(const Temporal *temp, bool oper)
Convert a temporal point to a geometry/geography point.
Definition: tpoint_spatialfuncs.c:2054
Temporal ** tpoint_make_simple(const Temporal *temp, int *count)
Split a temporal point into an array of non self-intersecting fragments.
Definition: tpoint_spatialfuncs.c:3528
Temporal * ttext_lower(const Temporal *temp)
Return a temporal text transformed to lowercase.
Definition: ttext_textfuncs_meos.c:101
Temporal * textcat_text_ttext(const text *txt, const Temporal *temp)
Temporal text functions: textcat, lower, upper.
Definition: ttext_textfuncs_meos.c:49
Temporal * ttext_upper(const Temporal *temp)
Return a temporal text transformed to uppercase.
Definition: ttext_textfuncs_meos.c:89
Temporal * textcat_ttext_ttext(const Temporal *temp1, const Temporal *temp2)
Return the concatenation of two temporal text values.
Definition: ttext_textfuncs_meos.c:75
Temporal * textcat_ttext_text(const Temporal *temp, const text *txt)
Return the concatenation of a temporal text and a text.
Definition: ttext_textfuncs_meos.c:62
Temporal * temporal_append_tsequence(Temporal *temp, const TSequence *seq, bool expand)
Append a sequence at the end of a temporal value.
Definition: temporal.c:874
Temporal * temporal_insert(const Temporal *temp1, const Temporal *temp2, bool connect)
Insert the second temporal value into the first one.
Definition: temporal.c:3577
Temporal * temporal_merge(const Temporal *temp1, const Temporal *temp2)
Merge two temporal values.
Definition: temporal.c:997
Temporal * temporal_merge_array(Temporal **temparr, int count)
Merge an array of temporal values.
Definition: temporal.c:1074
Temporal * temporal_to_tinstant(const Temporal *temp)
Return a temporal value transformed into a temporal instant.
Definition: temporal.c:1266
Temporal * temporal_to_tsequenceset(const Temporal *temp)
Return a temporal value transformed into a temporal sequence set.
Definition: temporal.c:1328
Temporal * temporal_update(const Temporal *temp1, const Temporal *temp2, bool connect)
Update the first temporal value with the second one.
Definition: temporal.c:3620
Temporal * temporal_tsample(const Temporal *temp, const Interval *duration, TimestampTz origin)
Sample the temporal value according to period buckets.
Definition: temporal.c:1733
Temporal * temporal_shift_tscale(const Temporal *temp, const Interval *shift, const Interval *duration)
Return a temporal value shifted and/or scaled by the intervals.
Definition: temporal.c:1376
Temporal * temporal_tprecision(const Temporal *temp, const Interval *duration, TimestampTz origin)
Set the precision of a temporal value according to period buckets.
Definition: temporal.c:1600
Temporal * temporal_to_tdiscseq(const Temporal *temp)
Return a temporal value transformed into a temporal sequence with discrete interpolation.
Definition: temporal.c:1287
Temporal * temporal_step_to_linear(const Temporal *temp)
Return a temporal value with continuous base type transformed from step to linear interpolation.
Definition: temporal.c:1349
Temporal * temporal_to_tcontseq(const Temporal *temp)
Return a temporal value transformed into a temporal sequence with continuous interpolation.
Definition: temporal.c:1308
Temporal * temporal_append_tinstant(Temporal *temp, const TInstant *inst, bool expand)
Append an instant to the end of a temporal value.
Definition: temporal.c:841
STBox * stbox_tile_list(STBox *bounds, double size, const Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, int **cellcount)
Generate a multidimensional grid for temporal points.
Definition: tpoint_tile.c:591
signed short int16
Functions for building a cache of temporal types and operators.
Definition: meos_catalog.h:41
SkipListElemType
Definition: meos.h:230
interpType
Enumeration that defines the interpolation types used in MobilityDB.
Definition: meos.h:124
bool after_temporal_timestampset(const Temporal *temp, const Set *ts)
Set * intersection_spanset_set(const SpanSet *ss, const Set *s)
Temporal * tfloat_minus_values(const Temporal *temp, const Set *set)
bool overleft_span_set(const Span *s, const Set *os)
bool overlaps_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overbefore_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool floatset_ne(const Set *s1, const Set *s2)
bool overbefore_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool before_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool bigintset_eq(const Set *s1, const Set *s2)
bool contained_set_spanset(const Set *s, const SpanSet *ss)
bool adjacent_span_set(const Span *s, const Set *os)
bool same_tfloat_float(const Temporal *tnumber, double d)
bool contains_bbox_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool adjacent_span_tnumber(const Span *span, const Temporal *tnumber)
Temporal * temporal_shift(const Temporal *temp, const Interval *shift)
Definition: temporal.c:1400
double distance_timestamp_timestamp(TimestampTz t1, TimestampTz t2)
SpanSet * union_timestampset_period(const Set *ts, const Span *p)
bool right_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool same_timestampset_temporal(const Set *ts, const Temporal *temp)
bool contained_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
int floatset_cmp(const Set *s1, const Set *s2)
Set * intersection_span_set(const Span *s, const Set *os)
bool overlaps_temporal_period(const Temporal *temp, const Span *p)
bool adjacent_float_tfloat(double d, const Temporal *tnumber)
bool overbefore_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool adjacent_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
SpanSet * union_span_set(const Span *s, const Set *os)
bool same_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool before_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool overafter_temporal_timestampset(const Temporal *temp, const Set *ts)
bool overlaps_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool right_tnumber_span(const Temporal *tnumber, const Span *span)
bool overleft_span_tnumber(const Span *span, const Temporal *tnumber)
bool same_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool left_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool left_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool contains_tint_int(const Temporal *tnumber, int i)
bool overright_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool adjacent_temporal_period(const Temporal *temp, const Span *p)
bool overleft_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool overbefore_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool contains_timestampset_temporal(const Set *ts, const Temporal *temp)
bool overright_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
Temporal * tint_minus_values(const Temporal *temp, const Set *set)
bool right_span_set(const Span *s, const Set *os)
bool overfront_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool after_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool right_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool after_timestampset_temporal(const Set *ts, const Temporal *temp)
bool overright_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool below_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool right_tfloat_float(const Temporal *tnumber, double d)
bool front_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool adjacent_set_spanset(const Set *s, const SpanSet *ss)
bool overlaps_tint_int(const Temporal *tnumber, int i)
bool overbefore_periodset_temporal(const SpanSet *ps, const Temporal *temp)
char * text2cstring(const text *textptr)
Convert a text value into a C string.
Definition: type_util.c:815
bool overbefore_temporal_period(const Temporal *temp, const Span *p)
Set * minus_set_span(const Set *os, const Span *s)
bool left_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool floatset_le(const Set *s1, const Set *s2)
bool overabove_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool contained_timestampset_temporal(const Set *ts, const Temporal *temp)
bool after_periodset_temporal(const SpanSet *ps, const Temporal *temp)
bool overlaps_tnumber_span(const Temporal *tnumber, const Span *span)
bool overleft_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool right_set_spanset(const Set *s, const SpanSet *ss)
bool same_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool overafter_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool above_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool left_float_tfloat(double d, const Temporal *tnumber)
bool after_timestamp_temporal(TimestampTz t, const Temporal *temp)
Set * intersection_timestampset_timestampset(const Set *ts1, const Set *ts2)
bool overafter_period_temporal(const Span *p, const Temporal *temp)
bool tstzset_eq(const Set *ts1, const Set *ts2)
double distance_span_set(const Span *s, const Set *os)
bool overback_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool right_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool overbefore_temporal_timestamp(const Temporal *temp, TimestampTz t)
bool overbefore_timestamp_temporal(TimestampTz t, const Temporal *temp)
bool contains_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
double distance_period_periodset(const Span *p, const SpanSet *ps)
bool overright_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool overafter_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool contains_tnumber_span(const Temporal *tnumber, const Span *span)
bool contained_temporal_timestamp(const Temporal *temp, TimestampTz t)
bool overlaps_int_tint(int i, const Temporal *tnumber)
bool contains_temporal_timestamp(const Temporal *temp, TimestampTz t)
double distance_timestampset_period(const Set *ts, const Span *p)
bool below_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overfront_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
int intset_cmp(const Set *s1, const Set *s2)
bool below_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
Temporal * ttext_minus_values(const Temporal *temp, const Set *set)
int tstzset_cmp(const Set *ts1, const Set *ts2)
bool contained_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool floatset_eq(const Set *s1, const Set *s2)
bool overlaps_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
int bigintset_cmp(const Set *s1, const Set *s2)
bool adjacent_timestampset_temporal(const Set *ts, const Temporal *temp)
bool overafter_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
char * bigintspanset_outbigintspanset_out(const SpanSet *ss)
int floatset_num_values(const Set *s)
bool contained_timestampset_timestampset(const Set *ts1, const Set *ts2)
bool overback_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overbefore_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool intset_ge(const Set *s1, const Set *s2)
Temporal ** tfloat_value_split(Temporal *temp, double size, double origin, int *newcount)
Split a temporal float into fragments with respect to value buckets.
Definition: temporal_tile.c:1551
bool contained_timestamp_temporal(TimestampTz t, const Temporal *temp)
bool adjacent_tnumber_span(const Temporal *tnumber, const Span *span)
bool overabove_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool front_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool contained_period_temporal(const Span *p, const Temporal *temp)
double distance_timestamp_timestampset(TimestampTz t, const Set *ts)
bool contains_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool same_periodset_temporal(const SpanSet *ps, const Temporal *temp)
Span * bigint_to_intspan(int i)
bool adjacent_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool contains_timestamp_temporal(TimestampTz t, const Temporal *temp)
bool same_float_tfloat(double d, const Temporal *tnumber)
bool contained_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool above_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool contained_tint_int(const Temporal *tnumber, int i)
bool left_spanset_set(const SpanSet *ss, const Set *s)
bool contains_temporal_timestampset(const Temporal *temp, const Set *ts)
bool after_temporal_period(const Temporal *temp, const Span *p)
bool tstzset_ne(const Set *ts1, const Set *ts2)
TBox * tstzset_to_tbox(const Set *ss)
bool adjacent_tfloat_float(const Temporal *tnumber, double d)
bool overlaps_temporal_timestamp(const Temporal *temp, TimestampTz t)
bool contains_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool contains_span_tnumber(const Span *span, const Temporal *tnumber)
bool adjacent_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool overlaps_spanset_set(const SpanSet *ss, const Set *s)
bool same_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
Set * minus_set_spanset(const Set *s, const SpanSet *ss)
int tstzset_num_timestamps(const Set *ts)
double distance_periodset_timestampset(const SpanSet *ps, const Set *ts)
bool overbefore_period_temporal(const Span *p, const Temporal *temp)
SpanSet * union_spanset_set(const SpanSet *ss, const Set *s)
bool overlaps_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool after_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
bool overafter_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool overleft_spanset_set(const SpanSet *ss, const Set *s)
Temporal * tpoint_minus_values(const Temporal *temp, const Set *set)
bool left_tfloat_float(const Temporal *tnumber, double d)
SpanSet * minus_spanset_set(const SpanSet *ss, const Set *s)
bool bigintset_lt(const Set *s1, const Set *s2)
bool left_set_span(const Set *os, const Span *s)
bool overafter_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
bool overleft_tnumber_span(const Temporal *tnumber, const Span *span)
bool after_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
int int_bucket(int value, int size, int origin)
Return the initial value of the bucket in which an integer value falls.
Definition: temporal_tile.c:150
bool left_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool above_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool overafter_temporal_timestamp(const Temporal *temp, TimestampTz t)
bool same_tnumber_span(const Temporal *tnumber, const Span *span)
bool adjacent_temporal_timestamp(const Temporal *temp, TimestampTz t)
Temporal ** temporal_time_split(Temporal *temp, Interval *duration, TimestampTz torigin, int *newcount)
Split a temporal value into fragments with respect to period buckets.
Definition: temporal_tile.c:1569
bool contains_span_set(const Span *s, const Set *os)
bool left_span_tnumber(const Span *span, const Temporal *tnumber)
Set * minus_timestampset_timestampset(const Set *ts1, const Set *ts2)
Set * union_timestamp_timestamp(TimestampTz t1, TimestampTz t2)
bool before_period_temporal(const Span *p, const Temporal *temp)
Set * intset_agg_transfn(Set *state, int i)
bool overbefore_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool right_span_tnumber(const Span *span, const Temporal *tnumber)
bool tstzset_lt(const Set *ts1, const Set *ts2)
bool overlaps_float_tfloat(double d, const Temporal *tnumber)
bool adjacent_span_spanset(const Span *s, const SpanSet *ss)
bool overleft_tfloat_float(const Temporal *tnumber, double d)
Set * intersection_timestampset_period(const Set *ts, const Span *p)
bool overlaps_timestampset_period(const Set *ts, const Span *p)
Temporal ** tfloat_value_time_split(Temporal *temp, double size, double vorigin, Interval *duration, TimestampTz torigin, int *newcount)
Split a temporal integer into fragments with respect to value and period buckets.
Definition: temporal_tile.c:1613
bool above_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool overlaps_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool same_temporal_period(const Temporal *temp, const Span *p)
bool front_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool contained_int_tint(int i, const Temporal *tnumber)
bool same_temporal_timestampset(const Temporal *temp, const Set *ts)
bool adjacent_set_span(const Set *os, const Span *s)
bool overright_set_span(const Set *os, const Span *s)
bool overright_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
double distance_periodset_period(const SpanSet *ps, const Span *p)
bool bigintset_le(const Set *s1, const Set *s2)
bool contains_int_tint(int i, const Temporal *tnumber)
bool overbelow_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overafter_timestamp_temporal(TimestampTz t, const Temporal *temp)
bool after_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool floatset_gt(const Set *s1, const Set *s2)
bool bigintset_gt(const Set *s1, const Set *s2)
bool before_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
Span * period_bucket_list(const Span *bounds, const Interval *duration, TimestampTz origin, int *newcount)
Return the bucket list from a period.
Definition: temporal_tile.c:384
bool contained_temporal_period(const Temporal *temp, const Span *p)
bool right_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool back_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool contains_temporal_period(const Temporal *temp, const Span *p)
bool overabove_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool after_period_temporal(const Span *p, const Temporal *temp)
bool overbelow_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool overlaps_temporal_timestampset(const Temporal *temp, const Set *ts)
bool after_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool overleft_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool left_int_tint(int i, const Temporal *tnumber)
bool right_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool intset_le(const Set *s1, const Set *s2)
TimestampTz timestamp_tprecision(TimestampTz t, const Interval *duration, TimestampTz torigin)
Operators for span set types.
Definition: spanset_ops.c:58
Temporal * tint_at_values(const Temporal *temp, const Set *set)
bool right_tint_int(const Temporal *tnumber, int i)
SpanSet * union_period_timestampset(const Span *p, const Set *ts)
bool intersection_timestamp_period(TimestampTz t, const Span *p, TimestampTz *result)
void floatspan_set_bigintspan(const Span *s1, Span *s2)
bool overright_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Set * set_shift(const Set *s, Datum shift)
Shift the values of set.
Definition: set.c:1079
bool same_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
STBox * tpoint_extent_transfn(STBox *box, const Temporal *temp)
Transition function for temporal extent aggregation of temporal point values.
Definition: tpoint_aggfuncs.c:243
bool back_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool before_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool overlaps_span_set(const Span *s, const Set *os)
Span * temporal_extent_transfn(Span *p, const Temporal *temp)
Transition function for temporal extent aggregate of temporal values.
Definition: temporal_aggfuncs.c:1091
bool contains_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
Temporal * tfloat_at_values(const Temporal *temp, const Set *set)
bool left_span_set(const Span *s, const Set *os)
double distance_timestamp_periodset(TimestampTz t, const SpanSet *ps)
void bigintspan_set_floatspan(const Span *s1, Span *s2)
bool intset_ne(const Set *s1, const Set *s2)
bool overright_span_tnumber(const Span *span, const Temporal *tnumber)
bool adjacent_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
Temporal * tpoint_at_values(const Temporal *temp, const Set *set)
TBox * span_to_tbox(const Span *span)
Set * set_agg_combinefn(Set *state1, Set *state2)
bool after_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool left_tint_int(const Temporal *tnumber, int i)
bool adjacent_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool contained_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool same_int_tint(int i, const Temporal *tnumber)
bool back_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool contained_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool right_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
Span * floatspan_bucket_list(const Span *bounds, double size, double origin, int *newcount)
Return the bucket list from an integer span.
Definition: temporal_tile.c:366
#define SKIPLIST_MAXLEVEL
Structure to represent skiplist elements.
Definition: meos_export.in.h:217
bool same_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool overleft_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overlaps_tfloat_float(const Temporal *tnumber, double d)
bool adjacent_periodset_temporal(const SpanSet *ps, const Temporal *temp)
SkipListElemType
Definition: meos_export.in.h:227
@ TIMESTAMPTZ
Definition: meos_export.in.h:228
@ TEMPORAL
Definition: meos_export.in.h:230
@ PERIOD
Definition: meos_export.in.h:229
bool before_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overbefore_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
bool contained_tnumber_span(const Temporal *tnumber, const Span *span)
bool overlaps_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool same_period_temporal(const Span *p, const Temporal *temp)
bool overbelow_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool overleft_set_spanset(const Set *s, const SpanSet *ss)
bool tstzset_gt(const Set *ts1, const Set *ts2)
bool contains_tfloat_float(const Temporal *tnumber, double d)
bool before_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
void meos_initialize(const char *tz_str)
Definition: pgtz.c:406
bool contained_periodset_temporal(const SpanSet *ps, const Temporal *temp)
bool overleft_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
SpanSet * periodset_tprecision(const SpanSet *ss, const Interval *duration, TimestampTz torigin)
Set the precision of a time value into an array of disjoint fragments.
Definition: spanset_ops.c:96
SpanSet * minus_span_set(const Span *s, const Set *os)
bool overright_span_set(const Span *s, const Set *os)
bool same_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
bool adjacent_tint_int(const Temporal *tnumber, int i)
bool above_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool adjacent_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool bigintset_ge(const Set *s1, const Set *s2)
bool adjacent_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool contains_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool contained_float_tfloat(double d, const Temporal *tnumber)
bool adjacent_int_tint(int i, const Temporal *tnumber)
Span * intspan_bucket_list(const Span *bounds, int size, int origin, int *newcount)
Return the bucket list from an integer span.
Definition: temporal_tile.c:349
bool overright_tnumber_span(const Temporal *tnumber, const Span *span)
Temporal * temporal_tscale(const Temporal *temp, const Interval *duration)
Definition: temporal.c:1406
bool contained_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
bool tstzset_ge(const Set *ts1, const Set *ts2)
double distance_timestampset_timestampset(const Set *ts1, const Set *ts2)
bool overbefore_temporal_timestampset(const Temporal *temp, const Set *ts)
bool overleft_float_tfloat(double d, const Temporal *tnumber)
bool overlaps_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool adjacent_timestamp_temporal(TimestampTz t, const Temporal *temp)
Span * period_tprecision(const Span *s, const Interval *duration, TimestampTz torigin)
Set the precision of a time value according to period buckets.
Definition: spanset_ops.c:73
bool same_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool overleft_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool overright_int_tint(int i, const Temporal *tnumber)
bool overback_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool same_span_tnumber(const Span *span, const Temporal *tnumber)
size_t temporal_memory_size(const Temporal *temp)
bool overfront_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool overlaps_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool overlaps_span_tnumber(const Span *span, const Temporal *tnumber)
bool contained_span_tnumber(const Span *span, const Temporal *tnumber)
bool contained_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool overabove_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool left_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool after_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool contained_tfloat_float(const Temporal *tnumber, double d)
double distance_timestamp_period(TimestampTz t, const Span *p)
bool intset_lt(const Set *s1, const Set *s2)
bool overback_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool overafter_periodset_temporal(const SpanSet *ps, const Temporal *temp)
bool intset_gt(const Set *s1, const Set *s2)
bool before_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool overright_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool overafter_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool left_set_spanset(const Set *s, const SpanSet *ss)
bool before_timestampset_temporal(const Set *ts, const Temporal *temp)
bool overbelow_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool left_tnumber_span(const Temporal *tnumber, const Span *span)
bool overafter_timestampset_temporal(const Set *ts, const Temporal *temp)
bool overleft_tint_int(const Temporal *tnumber, int i)
void meos_finalize(void)
Definition: pgtz.c:422
bool overlaps_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool front_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
TimestampTz timestamptz_bucket(TimestampTz timestamp, const Interval *duration, TimestampTz origin)
Return the initial timestamp of the bucket in which a timestamp falls.
Definition: temporal_tile.c:284
bool same_timestamp_temporal(TimestampTz t, const Temporal *temp)
SpanSet * union_timestamp_period(TimestampTz t, const Span *p)
bool before_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
int intset_num_values(const Set *s)
bool contains_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool right_spanset_set(const SpanSet *ss, const Set *s)
bool contains_periodset_temporal(const SpanSet *ps, const Temporal *temp)
bool overlaps_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
bool contained_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
TSequence * tsequence_make_exp(const TInstant **instants, int count, int maxcount, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Construct a temporal sequence from an array of temporal instants.
Definition: tsequence.c:917
bool contains_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool contains_period_temporal(const Span *p, const Temporal *temp)
Temporal ** tint_value_time_split(Temporal *temp, int size, int vorigin, Interval *duration, TimestampTz torigin, int *newcount)
Split a temporal integer into fragments with respect to value and period buckets.
Definition: temporal_tile.c:1590
bool after_temporal_periodset(const Temporal *temp, const SpanSet *ps)
bool left_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool floatset_lt(const Set *s1, const Set *s2)
bool adjacent_period_temporal(const Span *p, const Temporal *temp)
SpanSet * tstzset_to_periodset(const Set *ts)
bool bigintset_ne(const Set *s1, const Set *s2)
bool contains_spanset_set(const SpanSet *ss, const Set *s)
bool same_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
Set * intersection_timestampset_periodset(const Set *ts, const SpanSet *ps)
interpType
Enumeration that defines the interpolation types used in MobilityDB.
Definition: meos_export.in.h:121
@ DISCRETE
Definition: meos_export.in.h:123
@ INTERP_NONE
Definition: meos_export.in.h:122
@ STEP
Definition: meos_export.in.h:124
@ LINEAR
Definition: meos_export.in.h:125
bool floatset_ge(const Set *s1, const Set *s2)
bool overright_spanset_set(const SpanSet *ss, const Set *s)
bool overabove_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
double distance_period_timestampset(const Span *p, const Set *ts)
bool overback_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool right_set_span(const Set *os, const Span *s)
bool overfront_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overleft_int_tint(int i, const Temporal *tnumber)
bool before_periodset_temporal(const SpanSet *ps, const Temporal *temp)
bool before_temporal_period(const Temporal *temp, const Span *p)
bool overright_float_tfloat(double d, const Temporal *tnumber)
bool contains_float_tfloat(double d, const Temporal *tnumber)
bool contained_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool right_float_tfloat(double d, const Temporal *tnumber)
bool contained_temporal_timestampset(const Temporal *temp, const Set *ts)
bool below_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
bool before_timestamp_temporal(TimestampTz t, const Temporal *temp)
bool contains_timestampset_timestampset(const Set *ts1, const Set *ts2)
text * cstring2text(const char *cstring)
Convert a C string into a text value.
Definition: type_util.c:799
TBox * tnumber_extent_transfn(TBox *box, const Temporal *temp)
Transition function for temporal extent aggregate of temporal numbers.
Definition: temporal_aggfuncs.c:1117
bool tstzset_le(const Set *ts1, const Set *ts2)
double distance_periodset_periodset(const SpanSet *ps1, const SpanSet *ps2)
int bigintset_num_values(const Set *s)
bool overbefore_timestampset_temporal(const Set *ts, const Temporal *temp)
bool overafter_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool overbelow_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool adjacent_temporal_timestampset(const Temporal *temp, const Set *ts)
Temporal * ttext_at_values(const Temporal *temp, const Set *set)
bool overright_tint_int(const Temporal *tnumber, int i)
double distance_timestampset_periodset(const Set *ts, const SpanSet *ps)
bool before_temporal_timestampset(const Temporal *temp, const Set *ts)
bool overafter_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool right_int_tint(int i, const Temporal *tnumber)
bool contains_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool adjacent_spanset_set(const SpanSet *ss, const Set *s)
bool overright_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool right_tbox_tnumber(const TBox *tbox, const Temporal *tnumber)
bool adjacent_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overleft_set_span(const Set *os, const Span *s)
bool same_tint_int(const Temporal *tnumber, int i)
bool before_temporal_timestamp(const Temporal *temp, TimestampTz t)
double float_bucket(double value, double size, double origin)
Return the initial value of the bucket in which a float value falls.
Definition: temporal_tile.c:197
bool back_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool front_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool left_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool contained_set_span(const Set *os, const Span *s)
bool adjacent_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool overleft_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool right_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint)
Temporal ** tint_value_split(Temporal *temp, int size, int origin, int *newcount)
Split a temporal integer into fragments with respect to value buckets.
Definition: temporal_tile.c:1533
bool intset_eq(const Set *s1, const Set *s2)
bool contained_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool overright_tfloat_float(const Temporal *tnumber, double d)
bool adjacent_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
bool overright_set_spanset(const Set *s, const SpanSet *ss)
bool below_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
bool after_temporal_timestamp(const Temporal *temp, TimestampTz t)
bool back_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool left_stbox_tpoint(const STBox *stbox, const Temporal *tpoint)
bool overleft_tnumber_tbox(const Temporal *tnumber, const TBox *tbox)
bool same_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
bool contains_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo)
bool overbefore_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2)
bool overafter_temporal_period(const Temporal *temp, const Span *p)
bool overfront_tpoint_stbox(const Temporal *tpoint, const STBox *stbox)
TBox * tbox_tile_list(const TBox *bounds, double xsize, const Interval *duration, double xorigin, TimestampTz torigin, int *rows, int *columns)
Return the tile list from a TBox.
Definition: temporal_tile.c:512
bool same_temporal_timestamp(const Temporal *temp, TimestampTz t)
set(MOBILITYDB_MODULE_PATHNAME "$libdir/lib${MOBILITYDB_LIB_NAME}") set(extschema "@extschema@") configure_file(mobilitydb.control $
Definition: CMakeLists.txt:1
int64 Timestamp
Definition: pg_ext_defs.in.h:18
int64 TimestampTz
Definition: pg_ext_defs.in.h:19
unsigned int uint32
Definition: pg_ext_defs.in.h:13
uintptr_t Datum
Definition: pg_ext_defs.in.h:4
signed int int32
Definition: pg_ext_defs.in.h:8
int32 DateADT
Definition: pg_ext_defs.in.h:16
int64 TimeADT
Definition: pg_ext_defs.in.h:17
unsigned char uint8
Definition: pg_ext_defs.in.h:11
unsigned long int uint64
Definition: pg_ext_defs.in.h:14
long int int64
Definition: pg_ext_defs.in.h:9
Datum buffer(PG_FUNCTION_ARGS)
Definition: postgis_ext_defs.in.h:139
Definition: pg_ext_defs.in.h:24
Struct for storing a similarity match.
Definition: meos.h:209
Structure to represent spatiotemporal boxes.
Definition: meos.h:107
API of the Mobility Engine Open Source (MEOS) library.
Definition: meos.h:56
Definition: meos.h:223
Structure to represent skiplists that keep the current state of an aggregation.
Definition: meos.h:240
Structure to represent span sets.
Definition: meos.h:83
Structure to represent spans (a.k.a.
Definition: meos.h:70
Structure to represent temporal boxes.
Definition: meos.h:97
Structure to represent temporal values of instant subtype.
Definition: meos.h:148
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:186
Structure to represent temporal values of instant set or sequence subtype.
Definition: meos.h:165
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:136
Definition: pgtz.h:42
Definition: pg_ext_defs.in.h:31