MobilityDB 1.3
Loading...
Searching...
No Matches
tcbuffer.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * This MobilityDB code is provided under The PostgreSQL License.
4 * Copyright (c) 2016-2025, 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-2025, 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 __TCBUFFER_H__
35#define __TCBUFFER_H__
36
37/* PostgreSQL */
38#include <postgres.h>
39/* MEOS */
40#include "temporal/temporal.h"
41#include "cbuffer/cbuffer.h"
42
43/*****************************************************************************/
44
45/* Validity functions */
46
47extern bool ensure_valid_tcbuffer_cbuffer(const Temporal *temp,
48 const Cbuffer *cb);
49extern bool ensure_valid_tcbuffer_geo(const Temporal *temp,
50 const GSERIALIZED *gs);
51extern bool ensure_valid_tcbuffer_stbox(const Temporal *temp,
52 const STBox *box);
53extern bool ensure_valid_tcbuffer_tcbuffer(const Temporal *temp1,
54 const Temporal *temp2);
55
56/* Interpolation functions */
57
58extern int tcbuffersegm_intersection_value(Datum start, Datum end,
59 Datum value, TimestampTz lower, TimestampTz upper, TimestampTz *t1,
60 TimestampTz *t2);
61extern int tcbuffersegm_intersection(Datum start1, Datum end1, Datum start2,
62 Datum end2, TimestampTz lower, TimestampTz upper, TimestampTz *t1,
63 TimestampTz *t2);
64
65extern int tcbuffersegm_dwithin_turnpt(Datum start1, Datum end1, Datum start2,
66 Datum end2, Datum dist, TimestampTz lower, TimestampTz upper,
67 TimestampTz *t1, TimestampTz *t2);
68extern int tcbuffersegm_distance_turnpt(Datum start1, Datum end1, Datum start2,
69 Datum end2, Datum dist UNUSED, TimestampTz lower, TimestampTz upper,
70 TimestampTz *t1, TimestampTz *t2);
71
72/*****************************************************************************/
73
74#endif /* __TCBUFFER_H__ */
#define UNUSED
Definition: temporal.h:75
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
Functions for temporal buffers.
Definition: cbuffer.h:50
Definition: postgis_ext_defs.in.h:170
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
bool ensure_valid_tcbuffer_stbox(const Temporal *temp, const STBox *box)
Ensure the validity of a temporal circular buffer and a spatiotemporal box.
Definition: tcbuffer.c:88
bool ensure_valid_tcbuffer_cbuffer(const Temporal *temp, const Cbuffer *cb)
Temporal distance for temporal network points.
Definition: tcbuffer.c:58
int tcbuffersegm_intersection_value(Datum start, Datum end, Datum value, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
Return 1 if a segment of a temporal circular buffer and a circular buffer intersect during the period...
Definition: tcbuffer.c:271
bool ensure_valid_tcbuffer_tcbuffer(const Temporal *temp1, const Temporal *temp2)
Return true if a temporal circular buffer and a circular buffer are valid for operations.
Definition: tcbuffer.c:103
int tcbuffersegm_dwithin_turnpt(Datum start1, Datum end1, Datum start2, Datum end2, Datum dist, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
Return the TWO timestamps at which two temporal circular buffers segments are at the distance d.
Definition: tcbuffer.c:148
int tcbuffersegm_intersection(Datum start1, Datum end1, Datum start2, Datum end2, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
Return 1 if the segments of two temporal circular buffers intersect during the period defined by the ...
Definition: tcbuffer.c:291
bool ensure_valid_tcbuffer_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure the validity of a temporal circular buffer and a geometry.
Definition: tcbuffer.c:73
int tcbuffersegm_distance_turnpt(Datum start1, Datum end1, Datum start2, Datum end2, Datum dist UNUSED, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
Return the TWO timestamps at which two temporal circular buffers segments are at the minimum distance...
Definition: tcbuffer.c:249
int const GSERIALIZED * gs
Definition: trgeo_spatialrels.h:52