MobilityDB 1.3
Loading...
Searching...
No Matches
tgeo_tempspatialrels.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 __TGEO_TEMPSPATIALRELS_H__
35#define __TGEO_TEMPSPATIALRELS_H__
36
37/* PostgreSQL */
38#include <postgres.h>
39/* MEOS */
40#include <meos.h>
41#include "temporal/temporal.h"
42
43/* Compute either the tintersects or the tdisjoint relationship */
44#define TINTERSECTS true
45#define TDISJOINT false
46
47/*****************************************************************************/
48
50 Datum base, Datum param, varfunc func, int numparam, bool invert);
52 const Temporal *temp2, Datum param, varfunc func, int numparam, bool invert);
53
54extern Temporal *tinterrel_tgeo_geo(const Temporal *temp,
55 const GSERIALIZED *gs, bool tinter, bool restr, bool atvalue);
56extern Temporal *tinterrel_tspatial_base(const Temporal *temp, Datum base,
57 bool tinter, bool restr, bool atvalue, datum_func2 func);
58
59extern Temporal *tinterrel_tspatial_base(const Temporal *temp,
60 Datum base, bool tinter, bool restr, bool atvalue, datum_func2 func);
62 const Temporal *temp2, bool tinter, bool restr, bool atvalue);
63
65 const Temporal *sync2, Datum dist, bool restr, bool atvalue,
66 datum_func3 func, tpfunc_temp tpfn);
67
68extern int tdwithin_add_solutions(int solutions, TimestampTz lower,
69 TimestampTz upper, bool lower_inc, bool upper_inc, bool upper_inc1,
70 TimestampTz t1, TimestampTz t2, TInstant **instants, TSequence **result);
71extern Temporal *tdwithin_tspatial_spatial(const Temporal *temp, Datum base,
72 Datum dist, bool restr, bool atvalue, datum_func3 func, tpfunc_temp tpfn);
74 const Temporal *sync2, Datum dist, bool restr, bool atvalue,
75 datum_func3 func, tpfunc_temp tpfn);
76
77/*****************************************************************************/
78
79#endif /* __TGEO_TEMPSPATIALRELS_H__ */
Temporal * tdwithin_tspatial_spatial(const Temporal *temp, Datum base, Datum dist, bool restr, bool atvalue, datum_func3 func, tpfunc_temp tpfn)
Return a temporal Boolean that states whether a spatiotemporal value and a base value are within a di...
Definition: tspatial_tempspatialrels.c:1498
Datum(* varfunc)(Datum,...)
Definition: temporal.h:283
int(* tpfunc_temp)(Datum, Datum, Datum, Datum, Datum, TimestampTz, TimestampTz, TimestampTz *, TimestampTz *)
Definition: temporal.h:290
Datum(* datum_func2)(Datum, Datum)
Definition: temporal.h:296
Datum(* datum_func3)(Datum, Datum, Datum)
Definition: temporal.h:297
External API of the Mobility Engine Open Source (MEOS) library.
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
Definition: postgis_ext_defs.in.h:170
Structure to represent temporal values of instant subtype.
Definition: meos.h:185
Structure to represent temporal values of sequence subtype.
Definition: meos.h:202
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
Temporal * tinterrel_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2, bool tinter, bool restr, bool atvalue)
Return a temporal Boolean that states whether two temporal geos intersect or are disjoint.
Definition: tspatial_tempspatialrels.c:504
Temporal * tspatialrel_tspatial_base(const Temporal *temp, Datum base, Datum param, varfunc func, int numparam, bool invert)
Generic spatiotemporal relationship for a spatiotemporal value and a base value.
Definition: tspatial_tempspatialrels.c:543
Temporal * tdwithin_tspatial_tspatial(const Temporal *sync1, const Temporal *sync2, Datum dist, bool restr, bool atvalue, datum_func3 func, tpfunc_temp tpfn)
Return a temporal Boolean that states whether two temporal geos are within a distance.
Definition: tspatial_tempspatialrels.c:1607
Temporal * tinterrel_tspatial_base(const Temporal *temp, Datum base, bool tinter, bool restr, bool atvalue, datum_func2 func)
Return a temporal Boolean that states whether a spatialtemporal value and a base value intersect or a...
Definition: tspatial_tempspatialrels.c:415
Temporal * tspatialrel_tspatial_tspatial_int(const Temporal *temp1, const Temporal *temp2, Datum param, varfunc func, int numparam, bool invert)
Generic spatiotemporal relationship for two temporal geometries.
Definition: tspatial_tempspatialrels.c:612
int tdwithin_add_solutions(int solutions, TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc, bool upper_inc1, TimestampTz t1, TimestampTz t2, TInstant **instants, TSequence **result)
Construct the result of the tdwithin function of a segment from the solutions of the quadratic equati...
Definition: tspatial_tempspatialrels.c:1165
Temporal * tinterrel_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs, bool tinter, bool restr, bool atvalue)
Return a temporal Boolean that states whether a temporal geo and a geometry intersect or are disjoint...
Definition: tspatial_tempspatialrels.c:478
int const GSERIALIZED * gs
Definition: trgeo_spatialrels.h:52