MobilityDB 1.3
Loading...
Searching...
No Matches
trgeo_seq.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_SEQ_H__
36#define __TRGEO_SEQ_H__
37
38/* PostgreSQL */
39#include <postgres.h>
40/* MEOS */
41#include "temporal/temporal.h"
42
43/*****************************************************************************
44 * General functions
45 *****************************************************************************/
46
47extern const GSERIALIZED *trgeoseq_geom_p(const TSequence *seq);
48
49extern size_t trgeoseq_pose_varsize(const TSequence *seq);
50extern void trgeoseq_set_pose(TSequence *seq);
51extern TSequence *trgeoseq_tposeseq(const TSequence *seq);
52
53/* Constructor functions */
54
55extern bool trgeoseq_make_valid(const GSERIALIZED *geom, const TInstant **instants,
56 int count, bool lower_inc, bool upper_inc, bool linear);
57extern TSequence *trgeoseq_make1_exp(const GSERIALIZED *geom, const TInstant **instants,
58 int count, int maxcount, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
59extern TSequence *trgeoseq_make1(const GSERIALIZED *geom, const TInstant **instants,
60 int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
61extern TSequence *trgeoseq_make_exp(const GSERIALIZED *geom, const TInstant **instants,
62 int count, int maxcount, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
63extern TSequence *trgeoseq_make(const GSERIALIZED *geom, const TInstant **instants,
64 int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
65extern TSequence *trgeoseq_make_free_exp(const GSERIALIZED *geom, TInstant **instants,
66 int count, int maxcount, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
67extern TSequence *trgeoseq_make_free(const GSERIALIZED *geom, TInstant **instants,
68 int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
69
70/* Transformation functions */
71
72extern TSequence *trgeoinst_to_tsequence(const TInstant *inst, interpType interp);
73extern TInstant *trgeoseq_to_tinstant(const TSequence *seq);
74
75/*****************************************************************************/
76
77#endif /* __TRGEO_SEQ_H__ */
interpType
Enumeration that defines the interpolation types used in MEOS.
Definition: meos.h:161
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
TSequence * trgeoinst_to_tsequence(const TInstant *inst, interpType interp)
Return a temporal instant transformed into a temporal sequence.
Definition: trgeo_seq.c:355
TSequence * trgeoseq_make_free_exp(const GSERIALIZED *geom, 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 and free the array and the instants ...
Definition: trgeo_seq.c:303
TSequence * trgeoseq_make1_exp(const GSERIALIZED *geom, 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: trgeo_seq.c:150
TSequence * trgeoseq_tposeseq(const TSequence *seq)
Returns a new temporal pose sequence obtained by removing the reference geometry of a temporal rigid ...
Definition: trgeo_seq.c:100
const GSERIALIZED * trgeoseq_geom_p(const TSequence *seq)
Returns the reference geometry of the temporal value.
Definition: trgeo_seq.c:59
TSequence * trgeoseq_make_exp(const GSERIALIZED *geom, 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: trgeo_seq.c:257
TSequence * trgeoseq_make_free(const GSERIALIZED *geom, 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: trgeo_seq.c:337
TSequence * trgeoseq_make1(const GSERIALIZED *geom, 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: trgeo_seq.c:239
TInstant * trgeoseq_to_tinstant(const TSequence *seq)
Return a temporal sequence transformed into a temporal instant.
Definition: trgeo_inst.c:215
TSequence * trgeoseq_make(const GSERIALIZED *geom, 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: trgeo_seq.c:282
size_t trgeoseq_pose_varsize(const TSequence *seq)
Returns the size of the trgeometryseq without reference geometry.
Definition: trgeo_seq.c:78
bool trgeoseq_make_valid(const GSERIALIZED *geom, const TInstant **instants, int count, bool lower_inc, bool upper_inc, bool linear)
Ensure the validity of the arguments when creating a temporal value.
Definition: trgeo_seq.c:116
void trgeoseq_set_pose(TSequence *seq)
Set the size of the trgeometryseq without reference geometry.
Definition: trgeo_seq.c:88