MobilityDB 1.3
Loading...
Searching...
No Matches
trgeo.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
35#ifndef __TRGEO_H__
36#define __TRGEO_H__
37
38/* PostgreSQL */
39#include <postgres.h>
40/* MEOS */
41#include "temporal/temporal.h"
42
44#define WITH_GEOM true
45#define NO_GEOM false
46
47/*****************************************************************************
48 * Miscellaneous functions defined in trgeo.c
49 *****************************************************************************/
50
51extern bool ensure_has_geom(int16 flags);
52extern bool ensure_valid_trgeo_geo(const Temporal *temp,
53 const GSERIALIZED *gs);
54extern bool ensure_valid_trgeo_stbox(const Temporal *temp,
55 const STBox *box);
56extern bool ensure_valid_trgeo_trgeo(const Temporal *temp1,
57 const Temporal *temp2);
58extern bool ensure_valid_trgeo_tpoint(const Temporal *temp1,
59 const Temporal *temp2);
60extern const GSERIALIZED *trgeo_geom_p(const Temporal *temp);
61
62/* Input/output functions */
63
64extern char *trgeo_wkt_out(const Temporal *temp, int maxdd, bool extended);
65
66/* Constructor functions */
67
69 const TInstant *inst);
71 const TSequence *seq);
73 const TSequenceSet *ss);
74
75/* Conversion functions */
76
77
78/* Accessor functions */
79
80extern bool trgeo_value_at_timestamptz(const Temporal *temp, TimestampTz t,
81 bool strict, Datum *result);
82
83/* Transformation functions */
84
85
86/*****************************************************************************/
87
88#endif /* __TRGEO_H__ */
bool trgeo_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, Datum *result)
Return the value of a temporal rigid geometry at a timestamptz.
Definition: trgeo.c:549
const GSERIALIZED * trgeo_geom_p(const Temporal *temp)
Return the reference geometry of a temporal rigid geometry.
Definition: trgeo.c:296
char * trgeo_wkt_out(const Temporal *temp, int maxdd, bool extended)
Return the (Extended) Well-Known Text (WKT or EWKT) representation of a temporal rigid geometry.
Definition: trgeo.c:194
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
signed short int16
Definition: postgres_ext_defs.in.h:10
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
Definition: postgis_ext_defs.in.h:170
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
Structure to represent temporal values of instant subtype.
Definition: meos.h:185
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:224
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
bool ensure_valid_trgeo_tpoint(const Temporal *temp1, const Temporal *temp2)
Ensure the validity of two temporal rigid geometries.
Definition: trgeo.c:107
bool ensure_valid_trgeo_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure the validity of a temporal rigid geometry and a geometry.
Definition: trgeo.c:94
bool ensure_has_geom(int16 flags)
Ensure that a temporal rigid geometry has a reference geometry.
Definition: trgeo.c:67
bool ensure_valid_trgeo_trgeo(const Temporal *temp1, const Temporal *temp2)
Ensure the validity of two temporal rigid geometries.
Definition: trgeo.c:120
TSequence * geo_tposeseq_to_trgeo(const GSERIALIZED *gs, const TSequence *seq)
Construct a temporal rigid geometry from a geometry and a temporal pose.
Definition: trgeo.c:355
bool ensure_valid_trgeo_stbox(const Temporal *temp, const STBox *box)
Ensure the validity of a temporal rigid geometry and a geometry.
Definition: trgeo.c:80
TSequenceSet * geo_tposeseqset_to_trgeo(const GSERIALIZED *gs, const TSequenceSet *ss)
Construct a temporal rigid geometry from a geometry and a temporal pose.
Definition: trgeo.c:378
TInstant * geo_tposeinst_to_trgeo(const GSERIALIZED *gs, const TInstant *inst)
Construct a temporal rigid geometry from a geometry and a temporal pose.
Definition: trgeo.c:337
int const GSERIALIZED * gs
Definition: trgeo_spatialrels.h:52