MobilityDB 1.1
meos.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#include "../postgres/postgres.h"
42#include "../postgres/utils/timestamp_def.h"
43#include "../postgres/utils/date.h"
44/* PostGIS */
45#include <liblwgeom.h>
46
47
48/*****************************************************************************
49 * Type definitions
50 *****************************************************************************/
51
55typedef struct
56{
64} Set;
65
69typedef struct
70{
73 bool lower_inc;
74 bool upper_inc;
77} Span;
78
82typedef struct
83{
90 Span elems[1];
91} SpanSet;
92
96typedef struct
97{
101} TBox;
102
106typedef struct
107{
109 double xmin;
110 double xmax;
111 double ymin;
112 double ymax;
113 double zmin;
114 double zmax;
117} STBox;
118
123typedef enum
124{
127 STEP = 2,
129} interpType;
130
135typedef struct
136{
141 /* variable-length data follows */
142} Temporal;
143
147typedef struct
148{
158 /* variable-length data follows */
159} TInstant;
160
164typedef struct
165{
177 /* variable-length data follows */
178} TSequence;
179
180#define TSEQUENCE_BBOX_PTR(seq) ((void *)(&(seq)->period))
181
185typedef struct
186{
200 /* variable-length data follows */
202
203#define TSEQUENCESET_BBOX_PTR(ss) ((void *)(&(ss)->period))
204
208typedef struct
209{
210 int i;
211 int j;
212} Match;
213
214/*****************************************************************************/
215
220#define SKIPLIST_MAXLEVEL 32
222typedef struct
223{
224 void *value;
228
229typedef enum
230{
235
239typedef struct
240{
243 int next;
245 int *freed;
248 int tail;
249 void *extra;
250 size_t extrasize;
252} SkipList;
253
254/*****************************************************************************
255 * Initialization of the MEOS library
256 *****************************************************************************/
257
258extern void meos_initialize(const char *tz_str);
259extern void meos_finalize(void);
260
261/*****************************************************************************
262 * Functions for input/output PostgreSQL time types
263 *****************************************************************************/
264
265extern bool bool_in(const char *in_str);
266extern char *bool_out(bool b);
267extern DateADT pg_date_in(const char *str);
268extern char *pg_date_out(DateADT date);
269extern int pg_interval_cmp(const Interval *interval1, const Interval *interval2);
270extern Interval *pg_interval_in(const char *str, int32 typmod);
271extern Interval *pg_interval_make(int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs);
272extern Interval *pg_interval_mul(const Interval *span, double factor);
273extern char *pg_interval_out(const Interval *span);
274extern Interval *pg_interval_pl(const Interval *span1, const Interval *span2);
275extern TimeADT pg_time_in(const char *str, int32 typmod);
276extern char *pg_time_out(TimeADT time);
277extern Timestamp pg_timestamp_in(const char *str, int32 typmod);
279extern TimestampTz pg_timestamp_mi_interval(TimestampTz timestamp, const Interval *span);
280extern char *pg_timestamp_out(Timestamp dt);
281extern TimestampTz pg_timestamp_pl_interval(TimestampTz timestamp, const Interval *span);
282extern TimestampTz pg_timestamptz_in(const char *str, int32 typmod);
283extern char *pg_timestamptz_out(TimestampTz dt);
284
285/*****************************************************************************
286 * Functions for input/output and manipulation of PostGIS types
287 *****************************************************************************/
288
289extern bytea *gserialized_as_ewkb(const GSERIALIZED *geom, char *type);
290extern char *gserialized_as_ewkt(const GSERIALIZED *geom, int precision);
291extern char *gserialized_as_geojson(const GSERIALIZED *geom, int option, int precision, char *srs);
292extern char *gserialized_as_hexewkb(const GSERIALIZED *geom, const char *type);
293extern char *gserialized_as_text(const GSERIALIZED *geom, int precision);
294extern GSERIALIZED *gserialized_from_ewkb(const bytea *bytea_wkb, int32 srid);
295extern GSERIALIZED *gserialized_from_geojson(const char *geojson);
296extern GSERIALIZED *gserialized_from_hexewkb(const char *wkt);
297extern GSERIALIZED *gserialized_from_text(char *wkt, int srid);
298extern GSERIALIZED *gserialized_in(char *input, int32 geom_typmod);
299extern char *gserialized_out(const GSERIALIZED *geom);
300extern bool pgis_gserialized_same(const GSERIALIZED *geom1, const GSERIALIZED *geom2);
301
302/*****************************************************************************
303 * Functions for set and span types
304 *****************************************************************************/
305
306/* Input/output functions for set and span types */
307
308extern Set *bigintset_in(const char *str);
309extern Span *bigintspan_in(const char *str);
310extern char *bigintspan_out(const Span *s);
311extern SpanSet *bigintspanset_in(const char *str);
313extern Set *floatset_in(const char *str);
314extern Span *floatspan_in(const char *str);
315extern char *floatspan_out(const Span *s, int maxdd);
316extern SpanSet *floatspanset_in(const char *str);
317extern char *floatspanset_out(const SpanSet *ss, int maxdd);
318extern char *geoset_as_text(const Set *set, int maxdd);
319extern char *geoset_as_ewkt(const Set *set, int maxdd);
320extern Set *intset_in(const char *str);
321extern Span *intspan_in(const char *str);
322extern char *intspan_out(const Span *s);
323extern SpanSet *intspanset_in(const char *str);
324extern char *intspanset_out(const SpanSet *ss);
325extern uint8_t *set_as_wkb(const Set *s, uint8_t variant, size_t *size_out);
326extern Set *set_from_hexwkb(const char *hexwkb);
327extern Set *set_from_wkb(const uint8_t *wkb, int size);
328extern char *set_out(const Set *s, int maxdd);
329extern Span *period_in(const char *str);
330extern char *period_out(const Span *s);
331extern SpanSet *periodset_in(const char *str);
332extern char *periodset_out(const SpanSet *ss);
333extern uint8_t *span_as_wkb(const Span *s, uint8_t variant, size_t *size_out);
334extern Span *span_from_hexwkb(const char *hexwkb);
335extern Span *span_from_wkb(const uint8_t *wkb, int size);
336extern char *span_out(const Span *s, int maxdd);
337extern uint8_t *spanset_as_wkb(const SpanSet *ss, uint8_t variant, size_t *size_out);
338extern SpanSet *spanset_from_hexwkb(const char *hexwkb);
339extern SpanSet *spanset_from_wkb(const uint8_t *wkb, int size);
340extern char *spanset_out(const SpanSet *ss, int maxdd);
341extern Set *tstzset_in(const char *str);
342
343/*****************************************************************************/
344
345/* Constructor functions for set and span types */
346
347extern Span *bigintspan_make(int64 lower, int64 upper, bool lower_inc, bool upper_inc);
348extern Span *floatspan_make(double lower, double upper, bool lower_inc, bool upper_inc);
349extern Span *intspan_make(int lower, int upper, bool lower_inc, bool upper_inc);
350extern Set *set_copy(const Set *ts);
351extern Span *period_make(TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc);
352extern Span *span_copy(const Span *s);
353extern SpanSet *spanset_copy(const SpanSet *ps);
354extern SpanSet *spanset_make(const Span **spans, int count, bool normalize);
355extern SpanSet *spanset_make_free(Span **spans, int count, bool normalize);
356
357/*****************************************************************************/
358
359/* Cast functions for set and span types */
360
361extern Set *bigint_to_bigintset(int64 i);
362extern Span *bigint_to_intspan(int i);
363extern Span *float_to_floaspan(double d);
364extern Set *float_to_floatset(double d);
365extern Set *int_to_intset(int i);
366extern Span *int_to_intspan(int i);
367extern void set_set_span(const Set *os, Span *s);
368extern Span *set_to_span(const Set *s);
369extern void spatialset_set_stbox(const Set *set, STBox *box);
370extern STBox *spatialset_to_stbox(const Set *s);
371extern SpanSet *set_to_spanset(const Set *s);
372extern SpanSet *span_to_spanset(const Span *s);
377
378/*****************************************************************************/
379
380/* Accessor functions for set and span types */
381
382extern int64 bigintset_end_value(const Set *s);
383extern int bigintset_num_values(const Set *s);
384extern int64 bigintset_start_value(const Set *s);
385extern bool bigintset_value_n(const Set *s, int n, int64 *result);
386extern int64 *bigintset_values(const Set *s);
387extern int bigintspan_lower(const Span *s);
388extern int bigintspan_upper(const Span *s);
389extern int bigintspanset_lower(const SpanSet *ss);
390extern int bigintspanset_upper(const SpanSet *ss);
391extern double floatset_end_value(const Set *s);
392extern int floatset_num_values(const Set *s);
393extern double floatset_start_value(const Set *s);
394extern bool floatset_value_n(const Set *s, int n, double *result);
395extern double *floatset_values(const Set *s);
396extern double floatspan_lower(const Span *s);
397extern double floatspan_upper(const Span *s);
398extern double floatspanset_lower(const SpanSet *ss);
399extern double floatspanset_upper(const SpanSet *ss);
400extern int intset_end_value(const Set *s);
401extern int intset_num_values(const Set *s);
402extern int intset_start_value(const Set *s);
403extern bool intset_value_n(const Set *s, int n, int *result);
404extern int *intset_values(const Set *s);
405extern int intspan_lower(const Span *s);
406extern int intspan_upper(const Span *s);
407extern int intspanset_lower(const SpanSet *ss);
408extern int intspanset_upper(const SpanSet *ss);
409extern Datum set_end_value(const Set *s);
410extern uint32 set_hash(const Set *s);
411extern uint64 set_hash_extended(const Set *s, uint64 seed);
412extern int set_mem_size(const Set *s);
413extern int set_num_values(const Set *s);
414extern Datum set_start_value(const Set *s);
415extern bool set_value_n(const Set *s, int n, Datum *result);
416extern Datum *set_values(const Set *s);
417extern Interval *period_duration(const Span *s);
418extern TimestampTz period_lower(const Span *p);
419extern TimestampTz period_upper(const Span *p);
420extern Interval *periodset_duration(const SpanSet *ps, bool boundspan);
422extern TimestampTz periodset_lower(const SpanSet *ps);
423extern int periodset_num_timestamps(const SpanSet *ps);
425extern bool periodset_timestamp_n(const SpanSet *ps, int n, TimestampTz *result);
426extern TimestampTz *periodset_timestamps(const SpanSet *ps, int *count);
427extern TimestampTz periodset_upper(const SpanSet *ps);
428extern uint32 span_hash(const Span *s);
429extern uint64 span_hash_extended(const Span *s, Datum seed);
430extern bool span_lower_inc(const Span *s);
431extern bool span_upper_inc(const Span *s);
432extern double span_width(const Span *s);
433extern Span *spanset_end_span(const SpanSet *ss);
434extern uint32 spanset_hash(const SpanSet *ps);
435extern uint64 spanset_hash_extended(const SpanSet *ps, uint64 seed);
436extern bool spanset_lower_inc(const SpanSet *ss);
437extern int spanset_mem_size(const SpanSet *ss);
438extern int spanset_num_spans(const SpanSet *ss);
439extern Span *spanset_span_n(const SpanSet *ss, int i);
440extern const Span **spanset_spans(const SpanSet *ss, int *count);
441extern Span *spanset_start_span(const SpanSet *ss);
442extern bool spanset_upper_inc(const SpanSet *ss);
443extern double spanset_width(const SpanSet *ss);
444extern TimestampTz tstzset_end_timestamp(const Set *ts);
445extern int tstzset_num_timestamps(const Set *ts);
446extern TimestampTz tstzset_start_timestamp(const Set *ts);
447extern bool tstzset_timestamp_n(const Set *ts, int n, TimestampTz *result);
448extern TimestampTz *tstzset_timestamps(const Set *ts);
449extern int geoset_srid(const Set *set);
450
451/*****************************************************************************/
452
453/* Transformation functions for set and span types */
454
455extern void bigintspan_set_floatspan(const Span *s1, Span *s2);
456extern void floatspan_set_bigintspan(const Span *s1, Span *s2);
457extern void floatspan_set_intspan(const Span *s1, Span *s2);
458extern void intspan_set_floatspan(const Span *s1, Span *s2);
459extern void numspan_set_floatspan(const Span *s1, Span *s2);
460extern Span *period_tprecision(const Span *s, const Interval *duration, TimestampTz torigin);
461extern SpanSet *periodset_tprecision(const SpanSet *ss, const Interval *duration, TimestampTz torigin);
462extern void period_shift_tscale(Span *p, const Interval *shift, const Interval *duration);
463extern SpanSet *periodset_shift_tscale(const SpanSet *ps, const Interval *shift, const Interval *duration);
464extern Set *set_shift(const Set *s, Datum shift);
465extern void span_expand(const Span *s1, Span *s2);
466extern TimestampTz timestamp_tprecision(TimestampTz t, const Interval *duration, TimestampTz torigin);
467extern Set *tstzset_shift_tscale(const Set *ts, const Interval *shift, const Interval *duration);
468
469/*****************************************************************************
470 * Bounding box functions for set and span types
471 *****************************************************************************/
472
473/* Topological functions for set and span types */
474
475extern bool adjacent_bigintspan_bigint(const Span *s, int64 i);
476extern bool adjacent_bigintspanset_bigint(const SpanSet *ss, int64 i);
477extern bool adjacent_floatspan_float(const Span *s, double d);
478extern bool adjacent_intspan_int(const Span *s, int i);
479extern bool adjacent_set_span(const Set *os, const Span *s);
480extern bool adjacent_set_spanset(const Set *s, const SpanSet *ss);
481extern bool adjacent_periodset_timestamp(const SpanSet *ps, TimestampTz t);
482extern bool adjacent_span_set(const Span *s, const Set *os);
483extern bool adjacent_span_span(const Span *s1, const Span *s2);
484extern bool adjacent_span_spanset(const Span *s, const SpanSet *ss);
485extern bool adjacent_spanset_set(const SpanSet *ss, const Set *s);
486extern bool adjacent_spanset_span(const SpanSet *ss, const Span *s);
487extern bool adjacent_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
488extern bool contained_bigint_bigintset(int64 i, const Set *s);
489extern bool contained_bigint_bigintspan(int64 i, const Span *s);
490extern bool contained_bigint_bigintspanset(int64 i, const SpanSet *ss);
491extern bool contained_float_floatset(double d, const Set *s);
492extern bool contained_float_floatspan(double d, const Span *s);
493extern bool contained_float_floatspanset(double d, const SpanSet *ss);
494extern bool contained_int_intset(int i, const Set *s);
495extern bool contained_int_intspanset (int i, const SpanSet *ss);
496extern bool contained_int_intspan(int i, const Span *s);
497extern bool contained_set_set(const Set *s1, const Set *s2);
498extern bool contained_set_span(const Set *os, const Span *s);
499extern bool contained_set_spanset(const Set *s, const SpanSet *ss);
500extern bool contained_span_span(const Span *s1, const Span *s2);
501extern bool contained_span_spanset(const Span *s, const SpanSet *ss);
502extern bool contained_spanset_span(const SpanSet *ss, const Span *s);
503extern bool contained_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
504extern bool contained_timestamp_period(TimestampTz t, const Span *p);
505extern bool contained_timestamp_timestampset(TimestampTz t, const Set *ts);
506extern bool contained_timestampset_timestampset(const Set *ts1, const Set *ts2);
507extern bool contains_floatspan_float(const Span *s, double d);
508extern bool contains_intspan_int(const Span *s, int i);
509extern bool contains_set_set(const Set *s1, const Set *s2);
510extern bool contains_period_timestamp(const Span *p, TimestampTz t);
511extern bool contains_periodset_timestamp(const SpanSet *ps, TimestampTz t);
512extern bool contains_span_set(const Span *s, const Set *os);
513extern bool contains_span_span(const Span *s1, const Span *s2);
514extern bool contains_span_spanset(const Span *s, const SpanSet *ss);
515extern bool contains_spanset_set(const SpanSet *ss, const Set *s);
516extern bool contains_spanset_span(const SpanSet *ss, const Span *s);
517extern bool contains_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
518extern bool contains_timestampset_timestamp(const Set *ts, TimestampTz t);
519extern bool contains_timestampset_timestampset(const Set *ts1, const Set *ts2);
520extern bool overlaps_set_set(const Set *s1, const Set *s2);
521extern bool overlaps_span_set(const Span *s, const Set *os);
522extern bool overlaps_span_span(const Span *s1, const Span *s2);
523extern bool overlaps_spanset_set(const SpanSet *ss, const Set *s);
524extern bool overlaps_spanset_span(const SpanSet *ss, const Span *s);
525extern bool overlaps_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
526extern bool overlaps_timestampset_period(const Set *ts, const Span *p);
527
528/*****************************************************************************/
529
530/* Position functions for set and span types */
531
532extern bool after_timestamp_timestampset(TimestampTz t, const Set *ts);
533extern bool before_periodset_timestamp(const SpanSet *ps, TimestampTz t);
534extern bool before_timestamp_timestampset(TimestampTz t, const Set *ts);
535extern bool left_float_floatspan(double d, const Span *s);
536extern bool left_floatspan_float(const Span *s, double d);
537extern bool left_int_intspan(int i, const Span *s);
538extern bool left_intspan_int(const Span *s, int i);
539extern bool left_set_set(const Set *s1, const Set *s2);
540extern bool left_set_span(const Set *os, const Span *s);
541extern bool left_set_spanset(const Set *s, const SpanSet *ss);
542extern bool left_span_set(const Span *s, const Set *os);
543extern bool left_span_span(const Span *s1, const Span *s2);
544extern bool left_span_spanset(const Span *s, const SpanSet *ss);
545extern bool left_spanset_set(const SpanSet *ss, const Set *s);
546extern bool left_spanset_span(const SpanSet *ss, const Span *s);
547extern bool left_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
548extern bool overafter_period_timestamp(const Span *p, TimestampTz t);
549extern bool overafter_periodset_timestamp(const SpanSet *ps, TimestampTz t);
550extern bool overafter_timestamp_period(TimestampTz t, const Span *p);
551extern bool overafter_timestamp_periodset(TimestampTz t, const SpanSet *ps);
552extern bool overafter_timestamp_timestampset(TimestampTz t, const Set *ts);
553extern bool overbefore_period_timestamp(const Span *p, TimestampTz t);
554extern bool overbefore_periodset_timestamp(const SpanSet *ps, TimestampTz t);
555extern bool overbefore_timestamp_period(TimestampTz t, const Span *p);
556extern bool overbefore_timestamp_periodset(TimestampTz t, const SpanSet *ps);
557extern bool overbefore_timestamp_timestampset(TimestampTz t, const Set *ts);
558extern bool overleft_float_floatspan(double d, const Span *s);
559extern bool overleft_floatspan_float(const Span *s, double d);
560extern bool overleft_int_intspan(int i, const Span *s);
561extern bool overleft_intspan_int(const Span *s, int i);
562extern bool overleft_set_set(const Set *s1, const Set *s2);
563extern bool overleft_set_span(const Set *os, const Span *s);
564extern bool overleft_set_spanset(const Set *s, const SpanSet *ss);
565extern bool overleft_span_set(const Span *s, const Set *os);
566extern bool overleft_span_span(const Span *s1, const Span *s2);
567extern bool overleft_span_spanset(const Span *s, const SpanSet *ss);
568extern bool overleft_spanset_set(const SpanSet *ss, const Set *s);
569extern bool overleft_spanset_span(const SpanSet *ss, const Span *s);
570extern bool overleft_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
571extern bool overright_float_floatspan(double d, const Span *s);
572extern bool overright_floatspan_float(const Span *s, double d);
573extern bool overright_int_intspan(int i, const Span *s);
574extern bool overright_intspan_int(const Span *s, int i);
575extern bool overright_set_set(const Set *s1, const Set *s2);
576extern bool overright_set_span(const Set *os, const Span *s);
577extern bool overright_set_spanset(const Set *s, const SpanSet *ss);
578extern bool overright_span_set(const Span *s, const Set *os);
579extern bool overright_span_span(const Span *s1, const Span *s2);
580extern bool overright_span_spanset(const Span *s, const SpanSet *ss);
581extern bool overright_spanset_set(const SpanSet *ss, const Set *s);
582extern bool overright_spanset_span(const SpanSet *ss, const Span *s);
583extern bool overright_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
584extern bool right_float_floatspan(double d, const Span *s);
585extern bool right_floatspan_float(const Span *s, double d);
586extern bool right_int_intspan(int i, const Span *s);
587extern bool right_intspan_int(const Span *s, int i);
588extern bool right_set_set(const Set *s1, const Set *s2);
589extern bool right_set_span(const Set *os, const Span *s);
590extern bool right_set_spanset(const Set *s, const SpanSet *ss);
591extern bool right_span_set(const Span *s, const Set *os);
592extern bool right_span_span(const Span *s1, const Span *s2);
593extern bool right_span_spanset(const Span *s, const SpanSet *ss);
594extern bool right_spanset_set(const SpanSet *ss, const Set *s);
595extern bool right_spanset_span(const SpanSet *ss, const Span *s);
596extern bool right_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
597
598/*****************************************************************************/
599
600/* Set functions for set and span types */
601
602extern Span *bbox_union_span_span(const Span *s1, const Span *s2);
603extern Set *intersection_set_set(const Set *s1, const Set *s2);
604extern bool intersection_period_timestamp(const Span *p, TimestampTz t, TimestampTz *result);
605extern bool intersection_periodset_timestamp(const SpanSet *ps, TimestampTz t, TimestampTz *result);
606extern Set *intersection_span_set(const Span *s, const Set *os);
607extern Span *intersection_span_span(const Span *s1, const Span *s2);
608extern Set *intersection_spanset_set(const SpanSet *ss, const Set *s);
609extern SpanSet *intersection_spanset_span(const SpanSet *ss, const Span *s);
610extern SpanSet *intersection_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
612extern Set *intersection_timestampset_period(const Set *ts, const Span *p);
614extern bool intersection_timestampset_timestamp(const Set *ts, const TimestampTz t, TimestampTz *result);
615extern Set *intersection_timestampset_timestampset(const Set *ts1, const Set *ts2);
616extern Set *minus_set_set(const Set *s1, const Set *s2);
617extern Set *minus_set_span(const Set *os, const Span *s);
618extern Set *minus_set_spanset(const Set *s, const SpanSet *ss);
621extern SpanSet *minus_span_set(const Span *s, const Set *os);
622extern SpanSet *minus_span_span(const Span *s1, const Span *s2);
623extern SpanSet *minus_span_spanset(const Span *s, const SpanSet *ss);
624extern SpanSet *minus_spanset_set(const SpanSet *ss, const Set *s);
625extern SpanSet *minus_spanset_span(const SpanSet *ss, const Span *s);
626extern SpanSet *minus_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
627extern bool minus_timestamp_period(TimestampTz t, const Span *p, TimestampTz *result);
628extern bool minus_timestamp_periodset(TimestampTz t, const SpanSet *ps, TimestampTz *result);
629extern Set *minus_timestampset_timestamp(const Set *ts, TimestampTz t);
630extern Set *minus_timestampset_timestampset(const Set *ts1, const Set *ts2);
631extern Set *union_set_set(const Set *s1, const Set *s2);
633extern SpanSet *union_period_timestampset(const Span *p, const Set *ts);
635extern SpanSet *union_span_set(const Span *s, const Set *os);
636extern SpanSet *union_span_span(const Span *s1, const Span *s2);
637extern SpanSet *union_spanset_set(const SpanSet *ss, const Set *s);
638extern SpanSet *union_spanset_span(const SpanSet *ss, const Span *s);
639extern SpanSet *union_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
642extern Set *union_timestamp_timestampset(TimestampTz t, const Set *ts);
643extern SpanSet *union_timestampset_period(const Set *ts, const Span *p);
644extern Set *union_timestampset_timestamp(const Set *ts, const TimestampTz t);
645
646/*****************************************************************************/
647
648/* Distance functions for set and span types */
649
650extern double distance_floatspan_float(const Span *s, double d);
651extern double distance_intspan_int(const Span *s, int i);
652extern double distance_set_set(const Set *s1, const Set *s2);
653extern double distance_period_periodset(const Span *p, const SpanSet *ps);
654extern double distance_period_timestamp(const Span *p, TimestampTz t);
655extern double distance_period_timestampset(const Span *p, const Set *ts);
656extern double distance_periodset_period(const SpanSet *ps, const Span *p);
657extern double distance_periodset_periodset(const SpanSet *ps1, const SpanSet *ps2);
658extern double distance_periodset_timestamp(const SpanSet *ps, TimestampTz t);
659extern double distance_periodset_timestampset(const SpanSet *ps, const Set *ts);
660extern double distance_span_set(const Span *s, const Set *os);
661extern double distance_span_span(const Span *s1, const Span *s2);
662extern double distance_spanset_span(const SpanSet *ss, const Span *s);
663extern double distance_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
664extern double distance_timestamp_period(TimestampTz t, const Span *p);
668extern double distance_timestampset_period(const Set *ts, const Span *p);
669extern double distance_timestampset_periodset(const Set *ts, const SpanSet *ps);
670extern double distance_timestampset_timestamp(const Set *ts, TimestampTz t);
671extern double distance_timestampset_timestampset(const Set *ts1, const Set *ts2);
672
673/*****************************************************************************/
674
675/* Aggregate functions for set and span types */
676
677extern Span *bigint_extent_transfn(Span *s, int64 i);
679extern Span *int_extent_transfn(Span *s, int i);
681extern Span *float_extent_transfn(Span *s, double d);
682extern Set *floatset_agg_transfn(Set *state, double d);
688extern Set *set_agg_combinefn(Set *state1, Set *state2);
689extern Set *set_agg_finalfn(Set *state);
690extern Span *span_extent_transfn(Span *s1, const Span *s2);
691extern Span *spanset_extent_transfn(Span *s, const SpanSet *ss);
692extern Set *textset_agg_transfn(Set *state, const text *txt);
698extern Span *set_extent_transfn(Span *span, const Set *set);
701
702/*****************************************************************************/
703
704/* Comparison functions for set and span types */
705
706extern int bigintset_cmp(const Set *s1, const Set *s2);
707extern bool bigintset_eq(const Set *s1, const Set *s2);
708extern bool bigintset_ge(const Set *s1, const Set *s2);
709extern bool bigintset_gt(const Set *s1, const Set *s2);
710extern bool bigintset_le(const Set *s1, const Set *s2);
711extern bool bigintset_lt(const Set *s1, const Set *s2);
712extern bool bigintset_ne(const Set *s1, const Set *s2);
713extern int floatset_cmp(const Set *s1, const Set *s2);
714extern bool floatset_eq(const Set *s1, const Set *s2);
715extern bool floatset_ge(const Set *s1, const Set *s2);
716extern bool floatset_gt(const Set *s1, const Set *s2);
717extern bool floatset_le(const Set *s1, const Set *s2);
718extern bool floatset_lt(const Set *s1, const Set *s2);
719extern bool floatset_ne(const Set *s1, const Set *s2);
720extern int intset_cmp(const Set *s1, const Set *s2);
721extern bool intset_eq(const Set *s1, const Set *s2);
722extern bool intset_ge(const Set *s1, const Set *s2);
723extern bool intset_gt(const Set *s1, const Set *s2);
724extern bool intset_le(const Set *s1, const Set *s2);
725extern bool intset_lt(const Set *s1, const Set *s2);
726extern bool intset_ne(const Set *s1, const Set *s2);
727extern int set_cmp(const Set *s1, const Set *s2);
728extern bool set_eq(const Set *s1, const Set *s2);
729extern bool set_ge(const Set *s1, const Set *s2);
730extern bool set_gt(const Set *s1, const Set *s2);
731extern bool set_le(const Set *s1, const Set *s2);
732extern bool set_lt(const Set *s1, const Set *s2);
733extern bool set_ne(const Set *s1, const Set *s2);
734extern int span_cmp(const Span *s1, const Span *s2);
735extern bool span_eq(const Span *s1, const Span *s2);
736extern bool span_ge(const Span *s1, const Span *s2);
737extern bool span_gt(const Span *s1, const Span *s2);
738extern bool span_le(const Span *s1, const Span *s2);
739extern bool span_lt(const Span *s1, const Span *s2);
740extern bool span_ne(const Span *s1, const Span *s2);
741extern int spanset_cmp(const SpanSet *ss1, const SpanSet *ss2);
742extern bool spanset_eq(const SpanSet *ss1, const SpanSet *ss2);
743extern bool spanset_ge(const SpanSet *ss1, const SpanSet *ss2);
744extern bool spanset_gt(const SpanSet *ss1, const SpanSet *ss2);
745extern bool spanset_le(const SpanSet *ss1, const SpanSet *ss2);
746extern bool spanset_lt(const SpanSet *ss1, const SpanSet *ss2);
747extern bool spanset_ne(const SpanSet *ss1, const SpanSet *ss2);
748extern int tstzset_cmp(const Set *ts1, const Set *ts2);
749extern bool tstzset_eq(const Set *ts1, const Set *ts2);
750extern bool tstzset_ge(const Set *ts1, const Set *ts2);
751extern bool tstzset_gt(const Set *ts1, const Set *ts2);
752extern bool tstzset_le(const Set *ts1, const Set *ts2);
753extern bool tstzset_lt(const Set *ts1, const Set *ts2);
754extern bool tstzset_ne(const Set *ts1, const Set *ts2);
755
756/******************************************************************************
757 * Functions for box types
758 *****************************************************************************/
759
760/* Input/output functions for box types */
761
762extern TBox *tbox_in(const char *str);
763extern char *tbox_out(const TBox *box, int maxdd);
764extern TBox *tbox_from_wkb(const uint8_t *wkb, int size);
765extern TBox *tbox_from_hexwkb(const char *hexwkb);
766extern STBox *stbox_from_wkb(const uint8_t *wkb, int size);
767extern STBox *stbox_from_hexwkb(const char *hexwkb);
768extern uint8_t *tbox_as_wkb(const TBox *box, uint8_t variant, size_t *size_out);
769extern char *tbox_as_hexwkb(const TBox *box, uint8_t variant, size_t *size);
770extern uint8_t *stbox_as_wkb(const STBox *box, uint8_t variant, size_t *size_out);
771extern char *stbox_as_hexwkb(const STBox *box, uint8_t variant, size_t *size);
772extern STBox *stbox_in(const char *str);
773extern char *stbox_out(const STBox *box, int maxdd);
774
775/*****************************************************************************/
776
777/* Constructor functions for box types */
778
779extern TBox *tbox_make(const Span *p, const Span *s);
780extern void tbox_set(const Span *p, const Span *s, TBox *box);
781extern TBox *tbox_copy(const TBox *box);
782extern STBox * stbox_make(bool hasx, bool hasz, bool geodetic, int32 srid,
783 double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const Span *p);
784extern void stbox_set(bool hasx, bool hasz, bool geodetic, int32 srid, double xmin, double xmax,
785 double ymin, double ymax, double zmin, double zmax, const Span *p, STBox *box);
786extern STBox *stbox_copy(const STBox *box);
787
788/*****************************************************************************/
789
790/* Cast functions for box types */
791
792extern TBox *int_to_tbox(int i);
793extern TBox *float_to_tbox(double d);
794extern TBox *span_to_tbox(const Span *span);
796extern TBox *tstzset_to_tbox(const Set *ss);
797extern TBox *period_to_tbox(const Span *p);
798extern TBox *periodset_to_tbox(const SpanSet *ps);
799extern TBox *int_timestamp_to_tbox(int i, TimestampTz t);
800extern TBox *float_timestamp_to_tbox(double d, TimestampTz t);
801extern TBox *int_period_to_tbox(int i, const Span *p);
802extern TBox *float_period_to_tbox(double d, const Span *p);
803extern TBox *span_timestamp_to_tbox(const Span *span, TimestampTz t);
804extern TBox *span_period_to_tbox(const Span *span, const Span *p);
805extern Span *tbox_to_floatspan(const TBox *box);
806extern Span *tbox_to_period(const TBox *box);
807extern Span *stbox_to_period(const STBox *box);
808extern TBox *tnumber_to_tbox(const Temporal *temp);
809extern GSERIALIZED *stbox_to_geo(const STBox *box);
810extern STBox *tpoint_to_stbox(const Temporal *temp);
811extern STBox *geo_to_stbox(const GSERIALIZED *gs);
813extern STBox *tstzset_to_stbox(const Set *ts);
814extern STBox *period_to_stbox(const Span *p);
815extern STBox *periodset_to_stbox(const SpanSet *ps);
817extern STBox *geo_period_to_stbox(const GSERIALIZED *gs, const Span *p);
818
819/*****************************************************************************/
820
821/* Accessor functions for box types */
822
823extern bool tbox_hasx(const TBox *box);
824extern bool tbox_hast(const TBox *box);
825extern bool tbox_xmin(const TBox *box, double *result);
826extern bool tbox_xmax(const TBox *box, double *result);
827extern bool tbox_tmin(const TBox *box, TimestampTz *result);
828extern bool tbox_tmax(const TBox *box, TimestampTz *result);
829extern bool stbox_hasx(const STBox *box);
830extern bool stbox_hasz(const STBox *box);
831extern bool stbox_hast(const STBox *box);
832extern bool stbox_isgeodetic(const STBox *box);
833extern bool stbox_xmin(const STBox *box, double *result);
834extern bool stbox_xmax(const STBox *box, double *result);
835extern bool stbox_ymin(const STBox *box, double *result);
836extern bool stbox_ymax(const STBox *box, double *result);
837extern bool stbox_zmin(const STBox *box, double *result);
838extern bool stbox_zmax(const STBox *box, double *result);
839extern bool stbox_tmin(const STBox *box, TimestampTz *result);
840extern bool stbox_tmax(const STBox *box, TimestampTz *result);
841extern int32 stbox_srid(const STBox *box);
842
843/*****************************************************************************/
844
845/* Transformation functions for box types */
846
847extern void tbox_expand(const TBox *box1, TBox *box2);
848extern void tbox_shift_tscale(TBox *box, const Interval *start, const Interval *duration);
849extern TBox *tbox_expand_value(const TBox *box, const double d);
850extern TBox *tbox_expand_time(const TBox *box, const Interval *interval);
851extern void stbox_expand(const STBox *box1, STBox *box2);
852extern void stbox_shift_tscale(STBox *box, const Interval *start, const Interval *duration);
853extern STBox *stbox_set_srid(const STBox *box, int32 srid);
854extern STBox *stbox_expand_space(const STBox *box, double d);
855extern STBox *stbox_expand_time(const STBox *box, const Interval *interval);
856
857/*****************************************************************************/
858
859/* Topological functions for box types */
860
861extern bool contains_tbox_tbox(const TBox *box1, const TBox *box2);
862extern bool contained_tbox_tbox(const TBox *box1, const TBox *box2);
863extern bool overlaps_tbox_tbox(const TBox *box1, const TBox *box2);
864extern bool same_tbox_tbox(const TBox *box1, const TBox *box2);
865extern bool adjacent_tbox_tbox(const TBox *box1, const TBox *box2);
866extern bool contains_stbox_stbox(const STBox *box1, const STBox *box2);
867extern bool contained_stbox_stbox(const STBox *box1, const STBox *box2);
868extern bool overlaps_stbox_stbox(const STBox *box1, const STBox *box2);
869extern bool same_stbox_stbox(const STBox *box1, const STBox *box2);
870extern bool adjacent_stbox_stbox(const STBox *box1, const STBox *box2);
871
872/*****************************************************************************/
873
874/* Position functions for box types */
875
876extern bool left_tbox_tbox(const TBox *box1, const TBox *box2);
877extern bool overleft_tbox_tbox(const TBox *box1, const TBox *box2);
878extern bool right_tbox_tbox(const TBox *box1, const TBox *box2);
879extern bool overright_tbox_tbox(const TBox *box1, const TBox *box2);
880extern bool before_tbox_tbox(const TBox *box1, const TBox *box2);
881extern bool overbefore_tbox_tbox(const TBox *box1, const TBox *box2);
882extern bool after_tbox_tbox(const TBox *box1, const TBox *box2);
883extern bool overafter_tbox_tbox(const TBox *box1, const TBox *box2);
884extern bool left_stbox_stbox(const STBox *box1, const STBox *box2);
885extern bool overleft_stbox_stbox(const STBox *box1, const STBox *box2);
886extern bool right_stbox_stbox(const STBox *box1, const STBox *box2);
887extern bool overright_stbox_stbox(const STBox *box1, const STBox *box2);
888extern bool below_stbox_stbox(const STBox *box1, const STBox *box2);
889extern bool overbelow_stbox_stbox(const STBox *box1, const STBox *box2);
890extern bool above_stbox_stbox(const STBox *box1, const STBox *box2);
891extern bool overabove_stbox_stbox(const STBox *box1, const STBox *box2);
892extern bool front_stbox_stbox(const STBox *box1, const STBox *box2);
893extern bool overfront_stbox_stbox(const STBox *box1, const STBox *box2);
894extern bool back_stbox_stbox(const STBox *box1, const STBox *box2);
895extern bool overback_stbox_stbox(const STBox *box1, const STBox *box2);
896extern bool before_stbox_stbox(const STBox *box1, const STBox *box2);
897extern bool overbefore_stbox_stbox(const STBox *box1, const STBox *box2);
898extern bool after_stbox_stbox(const STBox *box1, const STBox *box2);
899extern bool overafter_stbox_stbox(const STBox *box1, const STBox *box2);
900
901/*****************************************************************************/
902
903/* Set functions for box types */
904
905extern TBox *union_tbox_tbox(const TBox *box1, const TBox *box2);
906extern bool inter_tbox_tbox(const TBox *box1, const TBox *box2, TBox *result);
907extern TBox *intersection_tbox_tbox(const TBox *box1, const TBox *box2);
908extern STBox *union_stbox_stbox(const STBox *box1, const STBox *box2, bool strict);
909extern bool inter_stbox_stbox(const STBox *box1, const STBox *box2, STBox *result);
910extern STBox *intersection_stbox_stbox(const STBox *box1, const STBox *box2);
911
912/*****************************************************************************/
913
914/* Comparison functions for box types */
915
916extern bool tbox_eq(const TBox *box1, const TBox *box2);
917extern bool tbox_ne(const TBox *box1, const TBox *box2);
918extern int tbox_cmp(const TBox *box1, const TBox *box2);
919extern bool tbox_lt(const TBox *box1, const TBox *box2);
920extern bool tbox_le(const TBox *box1, const TBox *box2);
921extern bool tbox_ge(const TBox *box1, const TBox *box2);
922extern bool tbox_gt(const TBox *box1, const TBox *box2);
923extern bool stbox_eq(const STBox *box1, const STBox *box2);
924extern bool stbox_ne(const STBox *box1, const STBox *box2);
925extern int stbox_cmp(const STBox *box1, const STBox *box2);
926extern bool stbox_lt(const STBox *box1, const STBox *box2);
927extern bool stbox_le(const STBox *box1, const STBox *box2);
928extern bool stbox_ge(const STBox *box1, const STBox *box2);
929extern bool stbox_gt(const STBox *box1, const STBox *box2);
930
931/*****************************************************************************
932 * Functions for temporal types
933 *****************************************************************************/
934
935/* Utility functions for temporal types */
936
937extern text *cstring2text(const char *cstring);
938extern char *text2cstring(const text *textptr);
939
940/* Input/output functions for temporal types */
941
942extern Temporal *tbool_in(const char *str);
943extern char *tbool_out(const Temporal *temp);
944extern char *temporal_as_hexwkb(const Temporal *temp, uint8_t variant, size_t *size_out);
945extern char *temporal_as_mfjson(const Temporal *temp, bool with_bbox, int flags, int precision, char *srs);
946extern uint8_t *temporal_as_wkb(const Temporal *temp, uint8_t variant, size_t *size_out);
947extern Temporal *temporal_from_hexwkb(const char *hexwkb);
948extern Temporal *temporal_from_mfjson(const char *mfjson);
949extern Temporal *temporal_from_wkb(const uint8_t *wkb, int size);
950extern Temporal *tfloat_in(const char *str);
951extern char *tfloat_out(const Temporal *temp, int maxdd);
952extern Temporal *tgeogpoint_in(const char *str);
953extern Temporal *tgeompoint_in(const char *str);
954extern Temporal *tint_in(const char *str);
955extern char *tint_out(const Temporal *temp);
956extern char *tpoint_as_ewkt(const Temporal *temp, int maxdd);
957extern char *tpoint_as_text(const Temporal *temp, int maxdd);
958extern char *tpoint_out(const Temporal *temp, int maxdd);
959extern Temporal *ttext_in(const char *str);
960extern char *ttext_out(const Temporal *temp);
961
962/*****************************************************************************/
963
964/* Constructor functions for temporal types */
965
966extern Temporal *tbool_from_base(bool b, const Temporal *temp);
967extern TInstant *tboolinst_make(bool b, TimestampTz t);
968extern TSequence *tbooldiscseq_from_base_time(bool b, const Set *ts);
969extern TSequence *tboolseq_from_base(bool b, const TSequence *seq);
970extern TSequence *tboolseq_from_base_time(bool b, const Span *p);
971extern TSequenceSet *tboolseqset_from_base(bool b, const TSequenceSet *ss);
972extern TSequenceSet *tboolseqset_from_base_time(bool b, const SpanSet *ps);
973extern Temporal *temporal_copy(const Temporal *temp);
974extern Temporal *tfloat_from_base(double d, const Temporal *temp, interpType interp);
975extern TInstant *tfloatinst_make(double d, TimestampTz t);
976extern TSequence *tfloatdiscseq_from_base_time(double d, const Set *ts);
977extern TSequence *tfloatseq_from_base(double d, const TSequence *seq, interpType interp);
978extern TSequence *tfloatseq_from_base_time(double d, const Span *p, interpType interp);
979extern TSequenceSet *tfloatseqset_from_base(double d, const TSequenceSet *ss, interpType interp);
980extern TSequenceSet *tfloatseqset_from_base_time(double d, const SpanSet *ps, interpType interp);
981extern Temporal *tgeogpoint_from_base(const GSERIALIZED *gs, const Temporal *temp, interpType interp);
983extern TSequence *tgeogpointdiscseq_from_base_time(const GSERIALIZED *gs, const Set *ts);
984extern TSequence *tgeogpointseq_from_base(const GSERIALIZED *gs, const TSequence *seq, interpType interp);
985extern TSequence *tgeogpointseq_from_base_time(const GSERIALIZED *gs, const Span *p, interpType interp);
988extern Temporal *tgeompoint_from_base(const GSERIALIZED *gs, const Temporal *temp, interpType interp);
990extern TSequence *tgeompointdiscseq_from_base_time(const GSERIALIZED *gs, const Set *ts);
991extern TSequence *tgeompointseq_from_base(const GSERIALIZED *gs, const TSequence *seq, interpType interp);
992extern TSequence *tgeompointseq_from_base_time(const GSERIALIZED *gs, const Span *p, interpType interp);
995extern Temporal *tint_from_base(int i, const Temporal *temp);
996extern TInstant *tintinst_make(int i, TimestampTz t);
997extern TSequence *tintdiscseq_from_base_time(int i, const Set *ts);
998extern TSequence *tintseq_from_base(int i, const TSequence *seq);
999extern TSequence *tintseq_from_base_time(int i, const Span *p);
1000extern TSequenceSet *tintseqset_from_base(int i, const TSequenceSet *ss);
1001extern TSequenceSet *tintseqset_from_base_time(int i, const SpanSet *ps);
1002extern TSequence *tsequence_make(const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
1003extern TSequence *tsequence_make_exp(const TInstant **instants, int count, int maxcount, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
1004extern TSequence *tpointseq_make_coords(const double *xcoords, const double *ycoords, const double *zcoords,
1005 const TimestampTz *times, int count, int32 srid, bool geodetic, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
1006extern TSequence *tsequence_make_free(TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
1007extern TSequenceSet *tsequenceset_make(const TSequence **sequences, int count, bool normalize);
1008extern TSequenceSet *tsequenceset_make_exp(const TSequence **sequences, int count, int maxcount, bool normalize);
1009extern TSequenceSet *tsequenceset_make_free(TSequence **sequences, int count, bool normalize);
1010extern TSequenceSet *tsequenceset_make_gaps(const TInstant **instants, int count, interpType interp, float maxdist, Interval *maxt);
1011extern Temporal *ttext_from_base(const text *txt, const Temporal *temp);
1012extern TInstant *ttextinst_make(const text *txt, TimestampTz t);
1013extern TSequence *ttextdiscseq_from_base_time(const text *txt, const Set *ts);
1014extern TSequence *ttextseq_from_base(const text *txt, const TSequence *seq);
1015extern TSequence *ttextseq_from_base_time(const text *txt, const Span *p);
1016extern TSequenceSet *ttextseqset_from_base(const text *txt, const TSequenceSet *ss);
1017extern TSequenceSet *ttextseqset_from_base_time(const text *txt, const SpanSet *ps);
1018
1019/*****************************************************************************/
1020
1021/* Cast functions for temporal types */
1022
1023extern Temporal *tfloat_to_tint(const Temporal *temp);
1024extern Temporal *tint_to_tfloat(const Temporal *temp);
1025extern Span *tnumber_to_span(const Temporal *temp);
1026extern Span *temporal_to_period(const Temporal *temp);
1027
1028/*****************************************************************************/
1029
1030/* Accessor functions for temporal types */
1031
1032extern bool tbool_end_value(const Temporal *temp);
1033extern bool tbool_start_value(const Temporal *temp);
1034extern bool *tbool_values(const Temporal *temp, int *count);
1035extern Interval *temporal_duration(const Temporal *temp, bool boundspan);
1036extern const TInstant *temporal_end_instant(const Temporal *temp);
1037extern TSequence *temporal_end_sequence(const Temporal *temp);
1038extern TimestampTz temporal_end_timestamp(const Temporal *temp);
1039extern uint32 temporal_hash(const Temporal *temp);
1040extern const TInstant *temporal_instant_n(const Temporal *temp, int n);
1041extern const TInstant **temporal_instants(const Temporal *temp, int *count);
1042extern char *temporal_interpolation(const Temporal *temp);
1043extern const TInstant *temporal_max_instant(const Temporal *temp);
1044extern const TInstant *temporal_min_instant(const Temporal *temp);
1045extern int temporal_num_instants(const Temporal *temp);
1046extern int temporal_num_sequences(const Temporal *temp);
1047extern int temporal_num_timestamps(const Temporal *temp);
1048extern TSequence **temporal_segments(const Temporal *temp, int *count);
1049extern TSequence *temporal_sequence_n(const Temporal *temp, int i);
1050extern TSequence **temporal_sequences(const Temporal *temp, int *count);
1051extern size_t temporal_memory_size(const Temporal *temp);
1052extern const TInstant *temporal_start_instant(const Temporal *temp);
1053extern TSequence *temporal_start_sequence(const Temporal *temp);
1055extern char *temporal_subtype(const Temporal *temp);
1056extern SpanSet *temporal_time(const Temporal *temp);
1057extern bool temporal_timestamp_n(const Temporal *temp, int n, TimestampTz *result);
1058extern TimestampTz *temporal_timestamps(const Temporal *temp, int *count);
1059extern double tfloat_end_value(const Temporal *temp);
1060extern double tfloat_max_value(const Temporal *temp);
1061extern double tfloat_min_value(const Temporal *temp);
1062extern SpanSet *tfloat_spanset(const Temporal *temp);
1063extern double tfloat_start_value(const Temporal *temp);
1064extern double *tfloat_values(const Temporal *temp, int *count);
1065extern int tint_end_value(const Temporal *temp);
1066extern int tint_max_value(const Temporal *temp);
1067extern int tint_min_value(const Temporal *temp);
1068extern int tint_start_value(const Temporal *temp);
1069extern int *tint_values(const Temporal *temp, int *count);
1070extern GSERIALIZED *tpoint_end_value(const Temporal *temp);
1071extern GSERIALIZED *tpoint_start_value(const Temporal *temp);
1072extern GSERIALIZED **tpoint_values(const Temporal *temp, int *count);
1073extern text *ttext_end_value(const Temporal *temp);
1074extern text *ttext_max_value(const Temporal *temp);
1075extern text *ttext_min_value(const Temporal *temp);
1076extern text *ttext_start_value(const Temporal *temp);
1077extern text **ttext_values(const Temporal *temp, int *count);
1078
1079/*****************************************************************************/
1080
1081/* Transformation functions for temporal types */
1082
1083extern Temporal *temporal_append_tinstant(Temporal *temp, const TInstant *inst, bool expand);
1084extern Temporal *temporal_append_tsequence(Temporal *temp, const TSequence *seq, bool expand);
1085extern Temporal *temporal_merge(const Temporal *temp1, const Temporal *temp2);
1086extern Temporal *temporal_merge_array(Temporal **temparr, int count);
1087extern Temporal *temporal_shift(const Temporal *temp, const Interval *shift);
1088extern Temporal *temporal_shift_tscale(const Temporal *temp, const Interval *shift, const Interval *duration);
1089extern Temporal *temporal_step_to_linear(const Temporal *temp);
1090extern Temporal *temporal_to_tinstant(const Temporal *temp);
1091extern Temporal *temporal_to_tdiscseq(const Temporal *temp);
1092extern Temporal *temporal_to_tcontseq(const Temporal *temp);
1093extern Temporal *temporal_to_tsequenceset(const Temporal *temp);
1094extern Temporal *temporal_tprecision(const Temporal *temp, const Interval *duration, TimestampTz origin);
1095extern Temporal *temporal_tsample(const Temporal *temp, const Interval *duration, TimestampTz origin);
1096extern Temporal *temporal_tscale(const Temporal *temp, const Interval *duration);
1097
1098/*****************************************************************************/
1099
1100/* Restriction functions for temporal types */
1101
1102extern Temporal *tbool_at_value(const Temporal *temp, bool b);
1103extern Temporal *tbool_minus_value(const Temporal *temp, bool b);
1104extern bool tbool_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, bool *value);
1105extern Temporal *temporal_at_max(const Temporal *temp);
1106extern Temporal *temporal_at_min(const Temporal *temp);
1107extern Temporal *temporal_at_period(const Temporal *temp, const Span *p);
1108extern Temporal *temporal_at_periodset(const Temporal *temp, const SpanSet *ps);
1109extern Temporal *temporal_at_timestamp(const Temporal *temp, TimestampTz t);
1110extern Temporal *temporal_at_timestampset(const Temporal *temp, const Set *ts);
1111extern Temporal *temporal_minus_max(const Temporal *temp);
1112extern Temporal *temporal_minus_min(const Temporal *temp);
1113extern Temporal *temporal_minus_period(const Temporal *temp, const Span *p);
1114extern Temporal *temporal_minus_periodset(const Temporal *temp, const SpanSet *ps);
1116extern Temporal *temporal_minus_timestampset(const Temporal *temp, const Set *ts);
1117extern Temporal *tfloat_at_value(const Temporal *temp, double d);
1118extern Temporal *tfloat_at_values(const Temporal *temp, const Set *set);
1119extern Temporal *tfloat_minus_value(const Temporal *temp, double d);
1120extern Temporal *tfloat_minus_values(const Temporal *temp, const Set *set);
1121extern bool tfloat_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, double *value);
1122extern Temporal *tint_at_value(const Temporal *temp, int i);
1123extern Temporal *tint_at_values(const Temporal *temp, const Set *set);
1124extern Temporal *tint_minus_value(const Temporal *temp, int i);
1125extern Temporal *tint_minus_values(const Temporal *temp, const Set *set);
1126extern bool tint_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, int *value);
1127extern Temporal *tnumber_at_span(const Temporal *temp, const Span *span);
1128extern Temporal *tnumber_at_spanset(const Temporal *temp, const SpanSet *ss);
1129extern Temporal *tnumber_at_tbox(const Temporal *temp, const TBox *box);
1130extern Temporal *tnumber_minus_span(const Temporal *temp, const Span *span);
1131extern Temporal *tnumber_minus_spanset(const Temporal *temp, const SpanSet *ss);
1132extern Temporal *tnumber_minus_tbox(const Temporal *temp, const TBox *box);
1133extern Temporal *tpoint_at_geometry(const Temporal *temp, const GSERIALIZED *gs);
1134extern Temporal *tpoint_at_stbox(const Temporal *temp, const STBox *box);
1135extern Temporal *tpoint_at_value(const Temporal *temp, GSERIALIZED *gs);
1136extern Temporal *tpoint_at_values(const Temporal *temp, const Set *set);
1137extern Temporal *tpoint_minus_geometry(const Temporal *temp, const GSERIALIZED *gs);
1138extern Temporal *tpoint_minus_stbox(const Temporal *temp, const STBox *box);
1139extern Temporal *tpoint_minus_value(const Temporal *temp, GSERIALIZED *gs);
1140extern Temporal *tpoint_minus_values(const Temporal *temp, const Set *set);
1141extern bool tpoint_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, GSERIALIZED **value);
1142extern TSequence *tsequence_at_period(const TSequence *seq, const Span *p);
1143extern Temporal *ttext_at_value(const Temporal *temp, text *txt);
1144extern Temporal *ttext_at_values(const Temporal *temp, const Set *set);
1145extern Temporal *ttext_minus_value(const Temporal *temp, text *txt);
1146extern Temporal *ttext_minus_values(const Temporal *temp, const Set *set);
1147extern bool ttext_value_at_timestamp(const Temporal *temp, TimestampTz t, bool strict, text **value);
1148
1149/*****************************************************************************/
1150
1151/* Boolean functions for temporal types */
1152
1153extern Temporal *tand_bool_tbool(bool b, const Temporal *temp);
1154extern Temporal *tand_tbool_bool(const Temporal *temp, bool b);
1155extern Temporal *tand_tbool_tbool(const Temporal *temp1, const Temporal *temp2);
1156extern Temporal *tnot_tbool(const Temporal *temp);
1157extern Temporal *tor_bool_tbool(bool b, const Temporal *temp);
1158extern Temporal *tor_tbool_bool(const Temporal *temp, bool b);
1159extern Temporal *tor_tbool_tbool(const Temporal *temp1, const Temporal *temp2);
1160extern SpanSet *tbool_when_true(const Temporal *temp);
1161
1162/*****************************************************************************/
1163
1164/* Mathematical functions for temporal types */
1165
1166extern Temporal *add_float_tfloat(double d, const Temporal *tnumber);
1167extern Temporal *add_int_tint(int i, const Temporal *tnumber);
1168extern Temporal *add_tfloat_float(const Temporal *tnumber, double d);
1169extern Temporal *add_tint_int(const Temporal *tnumber, int i);
1170extern Temporal *add_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1171extern Temporal *div_float_tfloat(double d, const Temporal *tnumber);
1172extern Temporal *div_int_tint(int i, const Temporal *tnumber);
1173extern Temporal *div_tfloat_float(const Temporal *tnumber, double d);
1174extern Temporal *div_tint_int(const Temporal *tnumber, int i);
1175extern Temporal *div_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1176extern Temporal *mult_float_tfloat(double d, const Temporal *tnumber);
1177extern Temporal *mult_int_tint(int i, const Temporal *tnumber);
1178extern Temporal *mult_tfloat_float(const Temporal *tnumber, double d);
1179extern Temporal *mult_tint_int(const Temporal *tnumber, int i);
1180extern Temporal *mult_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1181extern Temporal *sub_float_tfloat(double d, const Temporal *tnumber);
1182extern Temporal *sub_int_tint(int i, const Temporal *tnumber);
1183extern Temporal *sub_tfloat_float(const Temporal *tnumber, double d);
1184extern Temporal *sub_tint_int(const Temporal *tnumber, int i);
1185extern Temporal *sub_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1186extern Temporal *tfloat_degrees(const Temporal *temp);
1187extern Temporal *tfloat_radians(const Temporal *temp);
1188extern Temporal *tfloat_derivative(const Temporal *temp);
1189extern Temporal *tnumber_abs(const Temporal *temp);
1190
1191/*****************************************************************************/
1192
1193/* Text functions for temporal types */
1194
1195extern Temporal *textcat_text_ttext(const text *txt, const Temporal *temp);
1196extern Temporal *textcat_ttext_text(const Temporal *temp, const text *txt);
1197extern Temporal *textcat_ttext_ttext(const Temporal *temp1, const Temporal *temp2);
1198extern Temporal *ttext_upper(const Temporal *temp);
1199extern Temporal *ttext_lower(const Temporal *temp);
1200
1201/*****************************************************************************
1202 * Bounding box functions for temporal types
1203 *****************************************************************************/
1204
1205/* Topological functions for temporal types */
1206
1207extern bool adjacent_float_tfloat(double d, const Temporal *tnumber);
1208extern bool adjacent_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1209extern bool adjacent_int_tint(int i, const Temporal *tnumber);
1210extern bool adjacent_period_temporal(const Span *p, const Temporal *temp);
1211extern bool adjacent_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1212extern bool adjacent_span_tnumber(const Span *span, const Temporal *tnumber);
1213extern bool adjacent_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1214extern bool adjacent_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1215extern bool adjacent_temporal_period(const Temporal *temp, const Span *p);
1216extern bool adjacent_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1217extern bool adjacent_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1219extern bool adjacent_temporal_timestampset(const Temporal *temp, const Set *ts);
1220extern bool adjacent_tfloat_float(const Temporal *tnumber, double d);
1222extern bool adjacent_timestampset_temporal(const Set *ts, const Temporal *temp);
1223extern bool adjacent_tint_int(const Temporal *tnumber, int i);
1224extern bool adjacent_tnumber_span(const Temporal *tnumber, const Span *span);
1225extern bool adjacent_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1226extern bool adjacent_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1227extern bool adjacent_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1228extern bool adjacent_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1229extern bool adjacent_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1230extern bool contained_float_tfloat(double d, const Temporal *tnumber);
1231extern bool contained_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1232extern bool contained_int_tint(int i, const Temporal *tnumber);
1233extern bool contained_period_temporal(const Span *p, const Temporal *temp);
1234extern bool contained_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1235extern bool contained_span_tnumber(const Span *span, const Temporal *tnumber);
1236extern bool contained_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1237extern bool contained_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1238extern bool contained_temporal_period(const Temporal *temp, const Span *p);
1239extern bool contained_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1240extern bool contained_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1242extern bool contained_temporal_timestampset(const Temporal *temp, const Set *ts);
1243extern bool contained_tfloat_float(const Temporal *tnumber, double d);
1245extern bool contained_timestampset_temporal(const Set *ts, const Temporal *temp);
1246extern bool contained_tint_int(const Temporal *tnumber, int i);
1247extern bool contained_tnumber_span(const Temporal *tnumber, const Span *span);
1248extern bool contained_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1249extern bool contained_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1250extern bool contained_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1251extern bool contained_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1252extern bool contained_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1253extern bool contains_bbox_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1254extern bool contains_float_tfloat(double d, const Temporal *tnumber);
1255extern bool contains_int_tint(int i, const Temporal *tnumber);
1256extern bool contains_period_temporal(const Span *p, const Temporal *temp);
1257extern bool contains_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1258extern bool contains_span_tnumber(const Span *span, const Temporal *tnumber);
1259extern bool contains_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1260extern bool contains_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1261extern bool contains_temporal_period(const Temporal *temp, const Span *p);
1262extern bool contains_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1263extern bool contains_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1265extern bool contains_temporal_timestampset(const Temporal *temp, const Set *ts);
1266extern bool contains_tfloat_float(const Temporal *tnumber, double d);
1268extern bool contains_timestampset_temporal(const Set *ts, const Temporal *temp);
1269extern bool contains_tint_int(const Temporal *tnumber, int i);
1270extern bool contains_tnumber_span(const Temporal *tnumber, const Span *span);
1271extern bool contains_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1272extern bool contains_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1273extern bool contains_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1274extern bool contains_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1275extern bool contains_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1276extern bool left_float_tfloat(double d, const Temporal *tnumber);
1277extern bool left_int_tint(int i, const Temporal *tnumber);
1278extern bool left_tfloat_float(const Temporal *tnumber, double d);
1279extern bool left_tint_int(const Temporal *tnumber, int i);
1280extern bool overlaps_float_tfloat(double d, const Temporal *tnumber);
1281extern bool overlaps_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1282extern bool overlaps_int_tint(int i, const Temporal *tnumber);
1283extern bool overlaps_span_tnumber(const Span *span, const Temporal *tnumber);
1284extern bool overlaps_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1285extern bool overlaps_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1286extern bool overlaps_temporal_period(const Temporal *temp, const Span *p);
1287extern bool overlaps_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1288extern bool overlaps_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1290extern bool overlaps_temporal_timestampset(const Temporal *temp, const Set *ts);
1291extern bool overlaps_tfloat_float(const Temporal *tnumber, double d);
1292extern bool overlaps_tint_int(const Temporal *tnumber, int i);
1293extern bool overlaps_tnumber_span(const Temporal *tnumber, const Span *span);
1294extern bool overlaps_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1295extern bool overlaps_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1296extern bool overlaps_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1297extern bool overlaps_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1298extern bool overlaps_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1299extern bool overleft_float_tfloat(double d, const Temporal *tnumber);
1300extern bool overleft_int_tint(int i, const Temporal *tnumber);
1301extern bool overleft_tfloat_float(const Temporal *tnumber, double d);
1302extern bool overleft_tint_int(const Temporal *tnumber, int i);
1303extern bool overright_float_tfloat(double d, const Temporal *tnumber);
1304extern bool overright_int_tint(int i, const Temporal *tnumber);
1305extern bool overright_tfloat_float(const Temporal *tnumber, double d);
1306extern bool overright_tint_int(const Temporal *tnumber, int i);
1307extern bool right_float_tfloat(double d, const Temporal *tnumber);
1308extern bool right_int_tint(int i, const Temporal *tnumber);
1309extern bool right_tfloat_float(const Temporal *tnumber, double d);
1310extern bool right_tint_int(const Temporal *tnumber, int i);
1311extern bool same_float_tfloat(double d, const Temporal *tnumber);
1312extern bool same_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1313extern bool same_int_tint(int i, const Temporal *tnumber);
1314extern bool same_period_temporal(const Span *p, const Temporal *temp);
1315extern bool same_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1316extern bool same_span_tnumber(const Span *span, const Temporal *tnumber);
1317extern bool same_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1318extern bool same_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1319extern bool same_temporal_period(const Temporal *temp, const Span *p);
1320extern bool same_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1321extern bool same_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1323extern bool same_temporal_timestampset(const Temporal *temp, const Set *ts);
1324extern bool same_tfloat_float(const Temporal *tnumber, double d);
1326extern bool same_timestampset_temporal(const Set *ts, const Temporal *temp);
1327extern bool same_tint_int(const Temporal *tnumber, int i);
1328extern bool same_tnumber_span(const Temporal *tnumber, const Span *span);
1329extern bool same_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1330extern bool same_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1331extern bool same_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1332extern bool same_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1333extern bool same_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1334
1335/*****************************************************************************/
1336
1337/* Position functions for temporal types */
1338
1339extern bool above_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1340extern bool above_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1341extern bool above_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1342extern bool above_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1343extern bool above_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1344extern bool after_period_temporal(const Span *p, const Temporal *temp);
1345extern bool after_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1346extern bool after_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1347extern bool after_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1348extern bool after_temporal_period(const Temporal *temp, const Span *p);
1349extern bool after_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1350extern bool after_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1352extern bool after_temporal_timestampset(const Temporal *temp, const Set *ts);
1354extern bool after_timestampset_temporal(const Set *ts, const Temporal *temp);
1355extern bool after_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1356extern bool after_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1357extern bool after_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1358extern bool after_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1359extern bool back_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1360extern bool back_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1361extern bool back_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1362extern bool back_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1363extern bool back_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1364extern bool before_period_temporal(const Span *p, const Temporal *temp);
1365extern bool before_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1366extern bool before_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1367extern bool before_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1368extern bool before_temporal_period(const Temporal *temp, const Span *p);
1369extern bool before_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1370extern bool before_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1372extern bool before_temporal_timestampset(const Temporal *temp, const Set *ts);
1374extern bool before_timestampset_temporal(const Set *ts, const Temporal *temp);
1375extern bool before_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1376extern bool before_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1377extern bool before_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1378extern bool before_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1379extern bool below_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1380extern bool below_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1381extern bool below_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1382extern bool below_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1383extern bool below_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1384extern bool front_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1385extern bool front_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1386extern bool front_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1387extern bool front_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1388extern bool front_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1389extern bool left_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1390extern bool left_span_tnumber(const Span *span, const Temporal *tnumber);
1391extern bool left_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1392extern bool left_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1393extern bool left_tnumber_span(const Temporal *tnumber, const Span *span);
1394extern bool left_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1395extern bool left_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1396extern bool left_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1397extern bool left_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1398extern bool left_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1399extern bool overabove_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1400extern bool overabove_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1401extern bool overabove_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1402extern bool overabove_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1403extern bool overabove_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1404extern bool overafter_period_temporal(const Span *p, const Temporal *temp);
1405extern bool overafter_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1406extern bool overafter_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1407extern bool overafter_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1408extern bool overafter_temporal_period(const Temporal *temp, const Span *p);
1409extern bool overafter_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1410extern bool overafter_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1412extern bool overafter_temporal_timestampset(const Temporal *temp, const Set *ts);
1414extern bool overafter_timestampset_temporal(const Set *ts, const Temporal *temp);
1415extern bool overafter_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1416extern bool overafter_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1417extern bool overafter_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1418extern bool overafter_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1419extern bool overback_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1420extern bool overback_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1421extern bool overback_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1422extern bool overback_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1423extern bool overback_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1424extern bool overbefore_period_temporal(const Span *p, const Temporal *temp);
1425extern bool overbefore_periodset_temporal(const SpanSet *ps, const Temporal *temp);
1426extern bool overbefore_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1427extern bool overbefore_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1428extern bool overbefore_temporal_period(const Temporal *temp, const Span *p);
1429extern bool overbefore_temporal_periodset(const Temporal *temp, const SpanSet *ps);
1430extern bool overbefore_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1432extern bool overbefore_temporal_timestampset(const Temporal *temp, const Set *ts);
1434extern bool overbefore_timestampset_temporal(const Set *ts, const Temporal *temp);
1435extern bool overbefore_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1436extern bool overbefore_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1437extern bool overbefore_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1438extern bool overbefore_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1439extern bool overbelow_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1440extern bool overbelow_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1441extern bool overbelow_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1442extern bool overbelow_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1443extern bool overbelow_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1444extern bool overfront_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1445extern bool overfront_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1446extern bool overfront_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1447extern bool overfront_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1448extern bool overfront_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1449extern bool overleft_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1450extern bool overleft_span_tnumber(const Span *span, const Temporal *tnumber);
1451extern bool overleft_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1452extern bool overleft_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1453extern bool overleft_tnumber_span(const Temporal *tnumber, const Span *span);
1454extern bool overleft_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1455extern bool overleft_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1456extern bool overleft_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1457extern bool overleft_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1458extern bool overleft_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1459extern bool overright_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1460extern bool overright_span_tnumber(const Span *span, const Temporal *tnumber);
1461extern bool overright_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1462extern bool overright_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1463extern bool overright_tnumber_span(const Temporal *tnumber, const Span *span);
1464extern bool overright_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1465extern bool overright_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1466extern bool overright_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1467extern bool overright_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1468extern bool overright_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1469extern bool right_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1470extern bool right_span_tnumber(const Span *span, const Temporal *tnumber);
1471extern bool right_stbox_tpoint(const STBox *stbox, const Temporal *tpoint);
1472extern bool right_tbox_tnumber(const TBox *tbox, const Temporal *tnumber);
1473extern bool right_tnumber_span(const Temporal *tnumber, const Span *span);
1474extern bool right_tnumber_tbox(const Temporal *tnumber, const TBox *tbox);
1475extern bool right_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1476extern bool right_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1477extern bool right_tpoint_stbox(const Temporal *tpoint, const STBox *stbox);
1478extern bool right_tpoint_tpoint(const Temporal *tpoint1, const Temporal *tpoint2);
1479
1480/*****************************************************************************/
1481
1482/* Distance functions for temporal types */
1483
1484extern Temporal *distance_tfloat_float(const Temporal *temp, double d);
1485extern Temporal *distance_tint_int(const Temporal *temp, int i);
1486extern Temporal *distance_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1487extern Temporal *distance_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo);
1488extern Temporal *distance_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1489extern double nad_stbox_geo(const STBox *box, const GSERIALIZED *gs);
1490extern double nad_stbox_stbox(const STBox *box1, const STBox *box2);
1491extern double nad_tbox_tbox(const TBox *box1, const TBox *box2);
1492extern double nad_tfloat_float(const Temporal *temp, double d);
1493extern double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2);
1494extern int nad_tint_int(const Temporal *temp, int i);
1495extern int nad_tint_tint(const Temporal *temp1, const Temporal *temp2);
1496extern double nad_tnumber_tbox(const Temporal *temp, const TBox *box);
1497extern double nad_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1498extern double nad_tpoint_stbox(const Temporal *temp, const STBox *box);
1499extern double nad_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1500extern TInstant *nai_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1501extern TInstant *nai_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1502extern bool shortestline_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, GSERIALIZED **result);
1503extern bool shortestline_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, GSERIALIZED **result);
1504
1505/*****************************************************************************/
1506
1507/* Ever/always functions for temporal types */
1508
1509extern bool tbool_always_eq(const Temporal *temp, bool b);
1510extern bool tbool_ever_eq(const Temporal *temp, bool b);
1511extern bool tfloat_always_eq(const Temporal *temp, double d);
1512extern bool tfloat_always_le(const Temporal *temp, double d);
1513extern bool tfloat_always_lt(const Temporal *temp, double d);
1514extern bool tfloat_ever_eq(const Temporal *temp, double d);
1515extern bool tfloat_ever_le(const Temporal *temp, double d);
1516extern bool tfloat_ever_lt(const Temporal *temp, double d);
1517extern bool tgeogpoint_always_eq(const Temporal *temp, GSERIALIZED *gs);;
1518extern bool tgeogpoint_ever_eq(const Temporal *temp, GSERIALIZED *gs);;
1519extern bool tgeompoint_always_eq(const Temporal *temp, GSERIALIZED *gs);
1520extern bool tgeompoint_ever_eq(const Temporal *temp, GSERIALIZED *gs);;
1521extern bool tint_always_eq(const Temporal *temp, int i);
1522extern bool tint_always_le(const Temporal *temp, int i);
1523extern bool tint_always_lt(const Temporal *temp, int i);
1524extern bool tint_ever_eq(const Temporal *temp, int i);
1525extern bool tint_ever_le(const Temporal *temp, int i);
1526extern bool tint_ever_lt(const Temporal *temp, int i);
1527extern bool ttext_always_eq(const Temporal *temp, text *txt);
1528extern bool ttext_always_le(const Temporal *temp, text *txt);
1529extern bool ttext_always_lt(const Temporal *temp, text *txt);
1530extern bool ttext_ever_eq(const Temporal *temp, text *txt);
1531extern bool ttext_ever_le(const Temporal *temp, text *txt);
1532extern bool ttext_ever_lt(const Temporal *temp, text *txt);
1533
1534/*****************************************************************************/
1535
1536/* Comparison functions for temporal types */
1537
1538extern int temporal_cmp(const Temporal *temp1, const Temporal *temp2);
1539extern bool temporal_eq(const Temporal *temp1, const Temporal *temp2);
1540extern bool temporal_ge(const Temporal *temp1, const Temporal *temp2);
1541extern bool temporal_gt(const Temporal *temp1, const Temporal *temp2);
1542extern bool temporal_le(const Temporal *temp1, const Temporal *temp2);
1543extern bool temporal_lt(const Temporal *temp1, const Temporal *temp2);
1544extern bool temporal_ne(const Temporal *temp1, const Temporal *temp2);
1545extern Temporal *teq_bool_tbool(bool b, const Temporal *temp);
1546extern Temporal *teq_float_tfloat(double d, const Temporal *temp);
1547extern Temporal *teq_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1548extern Temporal *teq_int_tint(int i, const Temporal *temp);
1549extern Temporal *teq_point_tgeogpoint(const GSERIALIZED *gs, const Temporal *temp);
1550extern Temporal *teq_point_tgeompoint(const GSERIALIZED *gs, const Temporal *temp);
1551extern Temporal *teq_tbool_bool(const Temporal *temp, bool b);
1552extern Temporal *teq_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1553extern Temporal *teq_text_ttext(const text *txt, const Temporal *temp);
1554extern Temporal *teq_tfloat_float(const Temporal *temp, double d);
1555extern Temporal *teq_tgeogpoint_point(const Temporal *temp, const GSERIALIZED *gs);
1556extern Temporal *teq_tgeompoint_point(const Temporal *temp, const GSERIALIZED *gs);
1557extern Temporal *teq_tint_int(const Temporal *temp, int i);
1558extern Temporal *teq_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1559extern Temporal *teq_ttext_text(const Temporal *temp, const text *txt);
1560extern Temporal *tge_float_tfloat(double d, const Temporal *temp);
1561extern Temporal *tge_int_tint(int i, const Temporal *temp);
1562extern Temporal *tge_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1563extern Temporal *tge_text_ttext(const text *txt, const Temporal *temp);
1564extern Temporal *tge_tfloat_float(const Temporal *temp, double d);
1565extern Temporal *tge_tint_int(const Temporal *temp, int i);
1566extern Temporal *tge_ttext_text(const Temporal *temp, const text *txt);
1567extern Temporal *tgt_float_tfloat(double d, const Temporal *temp);
1568extern Temporal *tgt_int_tint(int i, const Temporal *temp);
1569extern Temporal *tgt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1570extern Temporal *tgt_text_ttext(const text *txt, const Temporal *temp);
1571extern Temporal *tgt_tfloat_float(const Temporal *temp, double d);
1572extern Temporal *tgt_tint_int(const Temporal *temp, int i);
1573extern Temporal *tgt_ttext_text(const Temporal *temp, const text *txt);
1574extern Temporal *tle_float_tfloat(double d, const Temporal *temp);
1575extern Temporal *tle_int_tint(int i, const Temporal *temp);
1576extern Temporal *tle_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1577extern Temporal *tle_text_ttext(const text *txt, const Temporal *temp);
1578extern Temporal *tle_tfloat_float(const Temporal *temp, double d);
1579extern Temporal *tle_tint_int(const Temporal *temp, int i);
1580extern Temporal *tle_ttext_text(const Temporal *temp, const text *txt);
1581extern Temporal *tlt_float_tfloat(double d, const Temporal *temp);
1582extern Temporal *tlt_int_tint(int i, const Temporal *temp);
1583extern Temporal *tlt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1584extern Temporal *tlt_text_ttext(const text *txt, const Temporal *temp);
1585extern Temporal *tlt_tfloat_float(const Temporal *temp, double d);
1586extern Temporal *tlt_tint_int(const Temporal *temp, int i);
1587extern Temporal *tlt_ttext_text(const Temporal *temp, const text *txt);
1588extern Temporal *tne_bool_tbool(bool b, const Temporal *temp);
1589extern Temporal *tne_float_tfloat(double d, const Temporal *temp);
1590extern Temporal *tne_geo_tpoint(const GSERIALIZED *geo, const Temporal *tpoint);
1591extern Temporal *tne_int_tint(int i, const Temporal *temp);
1592extern Temporal *tne_point_tgeogpoint(const GSERIALIZED *gs, const Temporal *temp);
1593extern Temporal *tne_point_tgeompoint(const GSERIALIZED *gs, const Temporal *temp);
1594extern Temporal *tne_tbool_bool(const Temporal *temp, bool b);
1595extern Temporal *tne_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1596extern Temporal *tne_text_ttext(const text *txt, const Temporal *temp);
1597extern Temporal *tne_tfloat_float(const Temporal *temp, double d);
1598extern Temporal *tne_tgeogpoint_point(const Temporal *temp, const GSERIALIZED *gs);
1599extern Temporal *tne_tgeompoint_point(const Temporal *temp, const GSERIALIZED *gs);
1600extern Temporal *tne_tint_int(const Temporal *temp, int i);
1601extern Temporal *tne_tpoint_geo(const Temporal *tpoint, const GSERIALIZED *geo);
1602extern Temporal *tne_ttext_text(const Temporal *temp, const text *txt);
1603
1604/*****************************************************************************
1605 Spatial functions for temporal point types
1606 *****************************************************************************/
1607
1608/* Spatial accessor functions for temporal point types */
1609
1610extern bool bearing_point_point(const GSERIALIZED *geo1, const GSERIALIZED *geo2, double *result);
1611extern Temporal *bearing_tpoint_point(const Temporal *temp, const GSERIALIZED *gs, bool invert);
1612extern Temporal *bearing_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1613extern Temporal *tpoint_azimuth(const Temporal *temp);
1614extern Temporal *tpoint_cumulative_length(const Temporal *temp);
1615extern Temporal *tpoint_get_coord(const Temporal *temp, int coord);
1616extern bool tpoint_is_simple(const Temporal *temp);
1617extern double tpoint_length(const Temporal *temp);
1618extern Temporal *tpoint_speed(const Temporal *temp);
1619extern int tpoint_srid(const Temporal *temp);
1620extern STBox *tpoint_stboxes(const Temporal *temp, int *count);
1621extern GSERIALIZED *tpoint_trajectory(const Temporal *temp);
1622
1623/*****************************************************************************/
1624
1625/* Spatial transformation functions for temporal point types */
1626
1627extern STBox *geo_expand_space(const GSERIALIZED *gs, double d);
1628extern Temporal *tgeompoint_tgeogpoint(const Temporal *temp, bool oper);
1629extern STBox *tpoint_expand_space(const Temporal *temp, double d);
1630extern Temporal **tpoint_make_simple(const Temporal *temp, int *count);
1631extern Temporal *tpoint_set_srid(const Temporal *temp, int32 srid);
1632
1633/*****************************************************************************/
1634
1635/* Spatial relationship functions for temporal point types */
1636
1637extern int econtains_geo_tpoint(const GSERIALIZED *geo, const Temporal *temp);
1638extern int edisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1639extern int edisjoint_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1640extern int edwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist);
1641extern int edwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist);
1642extern int eintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1643extern int eintersects_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
1644extern int etouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
1645extern Temporal *tcontains_geo_tpoint(const GSERIALIZED *gs, const Temporal *temp, bool restr, bool atvalue);
1646extern Temporal *tdisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo, bool restr, bool atvalue);
1647extern Temporal *tdwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist, bool restr, bool atvalue);
1648extern Temporal *tdwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist, bool restr, bool atvalue);
1649extern Temporal *tintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *geo, bool restr, bool atvalue);
1650extern Temporal *ttouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, bool restr, bool atvalue);
1651
1652/*****************************************************************************/
1653
1654/* Modification functions for temporal types */
1655
1656extern Temporal *temporal_insert(const Temporal *temp1, const Temporal *temp2, bool connect);
1657extern Temporal *temporal_update(const Temporal *temp1, const Temporal *temp2, bool connect);
1658extern Temporal *temporal_delete_timestamp(const Temporal *temp, TimestampTz t, bool connect);
1659extern Temporal *temporal_delete_timestampset(const Temporal *temp, const Set *ts, bool connect);
1660extern Temporal *temporal_delete_period(const Temporal *temp, const Span *p, bool connect);
1661extern Temporal *temporal_delete_periodset(const Temporal *temp, const SpanSet *ps, bool connect);
1662
1663/*****************************************************************************/
1664
1665/* Local and temporal aggregate functions for temporal types */
1666
1667extern SkipList *tbool_tand_transfn(SkipList *state, const Temporal *temp);
1668extern SkipList *tbool_tor_transfn(SkipList *state, const Temporal *temp);
1669extern Span *temporal_extent_transfn(Span *p, const Temporal *temp);
1672extern SkipList *tfloat_tmax_transfn(SkipList *state, const Temporal *temp);
1673extern SkipList *tfloat_tmin_transfn(SkipList *state, const Temporal *temp);
1674extern SkipList *tfloat_tsum_transfn(SkipList *state, const Temporal *temp);
1675extern SkipList *tint_tmax_transfn(SkipList *state, const Temporal *temp);
1676extern SkipList *tint_tmin_transfn(SkipList *state, const Temporal *temp);
1677extern SkipList *tint_tsum_transfn(SkipList *state, const Temporal *temp);
1678extern double tnumber_integral(const Temporal *temp);
1679extern TBox *tnumber_extent_transfn(TBox *box, const Temporal *temp);
1681extern SkipList *tnumber_tavg_transfn(SkipList *state, const Temporal *temp);
1682extern double tnumber_twavg(const Temporal *temp);
1683extern STBox *tpoint_extent_transfn(STBox *box, const Temporal *temp);
1684extern GSERIALIZED *tpoint_twcentroid(const Temporal *temp);
1685extern SkipList *ttext_tmax_transfn(SkipList *state, const Temporal *temp);
1686extern SkipList *ttext_tmin_transfn(SkipList *state, const Temporal *temp);
1687
1688/*****************************************************************************/
1689
1690/* Tile functions for temporal types */
1691
1692extern int int_bucket(int value, int size, int origin);
1693extern double float_bucket(double value, double size, double origin);
1694extern TimestampTz timestamptz_bucket(TimestampTz timestamp, const Interval *duration, TimestampTz origin);
1695
1696extern Span *intspan_bucket_list(const Span *bounds, int size, int origin, int *newcount);
1697extern Span *floatspan_bucket_list(const Span *bounds, double size, double origin, int *newcount);
1698extern Span *period_bucket_list(const Span *bounds, const Interval *duration, TimestampTz origin, int *newcount);
1699
1700extern TBox *tbox_tile_list(const TBox *bounds, double xsize, const Interval *duration, double xorigin, TimestampTz torigin, int *rows, int *columns);
1701
1702extern Temporal **tint_value_split(Temporal *temp, int size, int origin, int *newcount);
1703extern Temporal **tfloat_value_split(Temporal *temp, double size, double origin, int *newcount);
1704extern Temporal **temporal_time_split(Temporal *temp, Interval *duration, TimestampTz torigin, int *newcount);
1705extern Temporal **tint_value_time_split(Temporal *temp, int size, int vorigin, Interval *duration, TimestampTz torigin, int *newcount);
1706extern Temporal **tfloat_value_time_split(Temporal *temp, double size, double vorigin, Interval *duration, TimestampTz torigin, int *newcount);
1707
1708extern STBox *stbox_tile_list(STBox *bounds, double size, const Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, int **cellcount);
1709
1710/*****************************************************************************/
1711
1712/* Similarity functions for temporal types */
1713
1714extern double temporal_frechet_distance(const Temporal *temp1, const Temporal *temp2);
1715extern double temporal_dyntimewarp_distance(const Temporal *temp1, const Temporal *temp2);
1716extern Match *temporal_frechet_path(const Temporal *temp1, const Temporal *temp2, int *count);
1717extern Match *temporal_dyntimewarp_path(const Temporal *temp1, const Temporal *temp2, int *count);
1718
1719/*****************************************************************************/
1720
1721/* Analytics functions for temporal types */
1722
1724Temporal *temporal_simplify(const Temporal *temp, double eps_dist, bool synchronized);
1725bool tpoint_AsMVTGeom(const Temporal *temp, const STBox *bounds, int32_t extent,
1726 int32_t buffer, bool clip_geom, GSERIALIZED **geom, int64 **timesarr, int *count);
1727bool tpoint_to_geo_measure(const Temporal *tpoint, const Temporal *measure, bool segmentize, GSERIALIZED **result);
1728
1729/*****************************************************************************/
1730
1731#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
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)
char * geoset_as_text(const Set *set, int maxdd)
Return the Well-Known Text (WKT) representation a geoset.
Definition: set.c:242
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.h:220
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.h:230
@ TIMESTAMPTZ
Definition: meos.h:231
@ TEMPORAL
Definition: meos.h:233
@ PERIOD
Definition: meos.h:232
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.h:124
@ DISCRETE
Definition: meos.h:126
@ INTERP_NONE
Definition: meos.h:125
@ STEP
Definition: meos.h:127
@ LINEAR
Definition: meos.h:128
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)
char * geoset_as_ewkt(const Set *set, int maxdd)
Return the Extended Well-Known Text (EWKT) representation a geoset.
Definition: set.c:253
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
int i
Definition: meos.h:210
int j
Definition: meos.h:211
Struct for storing a similarity match.
Definition: meos.h:209
double xmin
minimum x value
Definition: meos.h:109
double zmin
minimum z value
Definition: meos.h:113
double ymin
minimum y value
Definition: meos.h:111
int32 srid
SRID.
Definition: meos.h:115
Span period
time span
Definition: meos.h:108
double xmax
maximum x value
Definition: meos.h:110
double zmax
maximum z value
Definition: meos.h:114
int16 flags
flags
Definition: meos.h:116
double ymax
maximum y value
Definition: meos.h:112
Structure to represent spatiotemporal boxes.
Definition: meos.h:107
int16 flags
flags
Definition: meos.h:60
uint8 basetype
span basetype
Definition: meos.h:59
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:57
int32 bboxsize
Size of the bouding box.
Definition: meos.h:63
int32 maxcount
Maximum number of elements.
Definition: meos.h:62
uint8 settype
set type
Definition: meos.h:58
int32 count
Number of elements.
Definition: meos.h:61
API of the Mobility Engine Open Source (MEOS) library.
Definition: meos.h:56
int height
Definition: meos.h:225
void * value
Definition: meos.h:224
Definition: meos.h:223
SkipListElemType elemtype
Definition: meos.h:241
int capacity
Definition: meos.h:242
void * extra
Definition: meos.h:249
int freecount
Definition: meos.h:246
size_t extrasize
Definition: meos.h:250
int length
Definition: meos.h:244
int freecap
Definition: meos.h:247
SkipListElem * elems
Definition: meos.h:251
int tail
Definition: meos.h:248
int * freed
Definition: meos.h:245
int next
Definition: meos.h:243
Structure to represent skiplists that keep the current state of an aggregation.
Definition: meos.h:240
Span span
Bounding span.
Definition: meos.h:89
uint8 spansettype
span set type
Definition: meos.h:85
int32 count
Number of Span elements.
Definition: meos.h:88
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:84
uint8 spantype
span type
Definition: meos.h:86
uint8 basetype
span basetype
Definition: meos.h:87
Structure to represent span sets.
Definition: meos.h:83
uint8 spantype
span type
Definition: meos.h:71
uint8 basetype
span basetype
Definition: meos.h:72
Datum lower
lower bound value
Definition: meos.h:75
bool lower_inc
lower bound is inclusive (vs exclusive)
Definition: meos.h:73
Datum upper
upper bound value
Definition: meos.h:76
bool upper_inc
upper bound is inclusive (vs exclusive)
Definition: meos.h:74
Structure to represent spans (a.k.a.
Definition: meos.h:70
int16 flags
flags
Definition: meos.h:100
Span period
time span
Definition: meos.h:98
Span span
value span
Definition: meos.h:99
Structure to represent temporal boxes.
Definition: meos.h:97
int16 flags
Flags.
Definition: meos.h:152
TimestampTz t
Timestamp (8 bytes)
Definition: meos.h:153
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:149
uint8 subtype
Temporal subtype.
Definition: meos.h:151
uint8 temptype
Temporal type.
Definition: meos.h:150
Datum value
Base value for types passed by value, first 8 bytes of the base value for values passed by reference.
Definition: meos.h:154
Structure to represent temporal values of instant subtype.
Definition: meos.h:148
uint8 subtype
Temporal subtype.
Definition: meos.h:189
int16 flags
Flags.
Definition: meos.h:190
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:187
uint8 temptype
Temporal type.
Definition: meos.h:188
int32 totalcount
Total number of TInstant elements in all composing TSequence elements.
Definition: meos.h:192
Span period
Time span (24 bytes).
Definition: meos.h:196
int32 maxcount
Maximum number of TSequence elements.
Definition: meos.h:194
int16 bboxsize
Size of the bounding box.
Definition: meos.h:195
int32 count
Number of TSequence elements.
Definition: meos.h:191
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:186
uint8 subtype
Temporal subtype.
Definition: meos.h:168
uint8 temptype
Temporal type.
Definition: meos.h:167
Span period
Time span (24 bytes).
Definition: meos.h:173
int32 count
Number of TInstant elements.
Definition: meos.h:170
int16 flags
Flags.
Definition: meos.h:169
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:166
int32 maxcount
Maximum number of TInstant elements.
Definition: meos.h:171
int16 bboxsize
Size of the bounding box.
Definition: meos.h:172
Structure to represent temporal values of instant set or sequence subtype.
Definition: meos.h:165
uint8 temptype
Temporal type.
Definition: meos.h:138
uint8 subtype
Temporal subtype.
Definition: meos.h:139
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:137
int16 flags
Flags.
Definition: meos.h:140
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