MobilityDB 1.3
Loading...
Searching...
No Matches
meos_pose.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 __MEOS_POSE_H__
35#define __MEOS_POSE_H__
36
37/* C */
38#include <stdbool.h>
39#include <stdint.h>
40/* MEOS */
41#include <meos.h>
42#include <meos_internal_geo.h>
43
44/*****************************************************************************
45 * Struct definitions
46 *****************************************************************************/
47
51typedef struct Pose Pose;
52
53/*****************************************************************************
54 * Validity macros
55 *****************************************************************************/
56
60#if MEOS
61 #define VALIDATE_POSESET(set, ret) \
62 do { \
63 if (! ensure_not_null((void *) set) || \
64 ! ensure_set_isof_type((set), T_POSESET) ) \
65 return (ret); \
66 } while (0)
67#else
68 #define VALIDATE_POSESET(set, ret) \
69 do { \
70 assert(set); \
71 assert((set)->settype == T_POSESET); \
72 } while (0)
73#endif
74
81#if MEOS
82 #define VALIDATE_TPOSE(temp, ret) \
83 do { \
84 if (! ensure_not_null((void *) (temp)) || \
85 ! ensure_temporal_isof_type((Temporal *) (temp), T_TPOSE) ) \
86 return (ret); \
87 } while (0)
88#else
89 #define VALIDATE_TPOSE(temp, ret) \
90 do { \
91 assert(temp); \
92 assert(((Temporal *) (temp))->temptype == T_TPOSE); \
93 } while (0)
94#endif
95
96/******************************************************************************
97 * Functions for poses
98 ******************************************************************************/
99
100/* Input and output functions */
101
102extern char *pose_as_ewkt(const Pose *pose, int maxdd);
103extern char *pose_as_hexwkb(const Pose *pose, uint8_t variant, size_t *size);
104extern char *pose_as_text(const Pose *pose, int maxdd);
105extern uint8_t *pose_as_wkb(const Pose *pose, uint8_t variant, size_t *size_out);
106extern Pose *pose_from_wkb(const uint8_t *wkb, size_t size);
107extern Pose *pose_from_hexwkb(const char *hexwkb);
108extern Pose *pose_in(const char *str);
109extern char *pose_out(const Pose *pose, int maxdd);
110
111/* Constructor functions */
112
113extern Pose *pose_copy(const Pose *pose);
114extern Pose *pose_make_2d(double x, double y, double theta, int32_t srid);
115extern Pose *pose_make_3d(double x, double y, double z, double W, double X, double Y, double Z, int32_t srid);
116extern Pose *pose_make_point2d(const GSERIALIZED *gs, double theta);
117extern Pose *pose_make_point3d(const GSERIALIZED *gs, double W, double X, double Y, double Z);
118
119/* Conversion functions */
120
121extern GSERIALIZED *pose_to_point(const Pose *pose);
122extern STBox *pose_to_stbox(const Pose *pose);
123
124/* Accessor functions */
125
126extern uint32 pose_hash(const Pose *pose);
127extern uint64 pose_hash_extended(const Pose *pose, uint64 seed);
128extern double *pose_orientation(const Pose *pose);
129extern double pose_rotation(const Pose *pose);
130
131/* Transformation functions */
132
133extern Pose *pose_round(const Pose *pose, int maxdd);
134extern Pose **posearr_round(const Pose **posearr, int count, int maxdd);
135
136/* Spatial reference system functions */
137
138extern void pose_set_srid(Pose *pose, int32_t srid);
139extern int32_t pose_srid(const Pose *pose);
140extern Pose *pose_transform(const Pose *pose, int32_t srid);
141extern Pose *pose_transform_pipeline(const Pose *pose, const char *pipelinestr, int32_t srid, bool is_forward);
142
143/* Bounding box functions */
144
145extern STBox *pose_tstzspan_to_stbox(const Pose *pose, const Span *s);
146extern STBox *pose_timestamptz_to_stbox(const Pose *pose, TimestampTz t);
147
148/* Distance functions */
149
150extern double distance_pose_geo(const Pose *pose, const GSERIALIZED *gs);
151extern double distance_pose_pose(const Pose *pose1, const Pose *pose2);
152extern double distance_pose_stbox(const Pose *pose, const STBox *box);
153
154/* Comparison functions */
155
156extern int pose_cmp(const Pose *pose1, const Pose *pose2);
157extern bool pose_eq(const Pose *pose1, const Pose *pose2);
158extern bool pose_ge(const Pose *pose1, const Pose *pose2);
159extern bool pose_gt(const Pose *pose1, const Pose *pose2);
160extern bool pose_le(const Pose *pose1, const Pose *pose2);
161extern bool pose_lt(const Pose *pose1, const Pose *pose2);
162extern bool pose_ne(const Pose *pose1, const Pose *pose2);
163extern bool pose_nsame(const Pose *pose1, const Pose *pose2);
164extern bool pose_same(const Pose *pose1, const Pose *pose2);
165
166/******************************************************************************
167 * Functions for pose sets
168 ******************************************************************************/
169
170/* Input and output functions */
171
172extern Set *poseset_in(const char *str);
173extern char *poseset_out(const Set *s, int maxdd);
174
175/* Constructor functions */
176
177extern Set *poseset_make(const Pose **values, int count);
178
179/* Conversion functions */
180
181extern Set *pose_to_set(const Pose *pose);
182
183/* Accessor functions */
184
185extern Pose *poseset_end_value(const Set *s);
186extern Pose *poseset_start_value(const Set *s);
187extern bool poseset_value_n(const Set *s, int n, Pose **result);
188extern Pose **poseset_values(const Set *s);
189
190/* Set operations */
191
192extern bool contained_pose_set(const Pose *pose, const Set *s);
193extern bool contains_set_pose(const Set *s, Pose *pose);
194extern Set *intersection_pose_set(const Pose *pose, const Set *s);
195extern Set *intersection_set_pose(const Set *s, const Pose *pose);
196extern Set *minus_pose_set(const Pose *pose, const Set *s);
197extern Set *minus_set_pose(const Set *s, const Pose *pose);
198extern Set *pose_union_transfn(Set *state, const Pose *pose);
199extern Set *union_pose_set(const Pose *pose, const Set *s);
200extern Set *union_set_pose(const Set *s, const Pose *pose);
201
202/*===========================================================================*
203 * Functions for temporal poses
204 *===========================================================================*/
205
206/*****************************************************************************
207 * Input/output functions
208 *****************************************************************************/
209
210Temporal *tpose_in(const char *str);
211
212/*****************************************************************************
213 * Constructor functions
214 *****************************************************************************/
215
216
217/*****************************************************************************
218 * Conversion functions
219 *****************************************************************************/
220
221extern Temporal *tpose_make(const Temporal *tpoint, const Temporal *tradius);
222extern Temporal *tpose_to_tpoint(const Temporal *temp);
223
224/*****************************************************************************
225 * Accessor functions
226 *****************************************************************************/
227
228extern Pose *tpose_end_value(const Temporal *temp);
229extern Set *tpose_points(const Temporal *temp);
230// extern Temporal *tpose_orientation(const Temporal *temp);
231extern Temporal *tpose_rotation(const Temporal *temp);
232extern Pose *tpose_start_value(const Temporal *temp);
233extern GSERIALIZED *tpose_trajectory(const Temporal *temp);
234extern bool tpose_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, Pose **value);
235extern bool tpose_value_n(const Temporal *temp, int n, Pose **result);
236extern Pose **tpose_values(const Temporal *temp, int *count);
237
238/*****************************************************************************
239 * Restriction functions
240 *****************************************************************************/
241
242extern Temporal *tpose_at_geom(const Temporal *temp, const GSERIALIZED *gs);
243extern Temporal *tpose_at_stbox(const Temporal *temp, const STBox *box, bool border_inc);
244extern Temporal *tpose_at_pose(const Temporal *temp, const Pose *pose);
245extern Temporal *tpose_minus_geom(const Temporal *temp, const GSERIALIZED *gs);
246extern Temporal *tpose_minus_pose(const Temporal *temp, const Pose *pose);
247extern Temporal *tpose_minus_stbox(const Temporal *temp, const STBox *box, bool border_inc);
248
249/*****************************************************************************
250 * Distance functions
251 *****************************************************************************/
252
253extern Temporal *tdistance_tpose_pose(const Temporal *temp, const Pose *pose);
254extern Temporal *tdistance_tpose_point(const Temporal *temp, const GSERIALIZED *gs);
255extern Temporal *tdistance_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
256extern double nad_tpose_geo(const Temporal *temp, const GSERIALIZED *gs);
257extern double nad_tpose_pose(const Temporal *temp, const Pose *pose);
258extern double nad_tpose_stbox(const Temporal *temp, const STBox *box);
259extern double nad_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
260extern TInstant *nai_tpose_geo(const Temporal *temp, const GSERIALIZED *gs);
261extern TInstant *nai_tpose_pose(const Temporal *temp, const Pose *pose);
262extern TInstant *nai_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
263extern GSERIALIZED *shortestline_tpose_geo(const Temporal *temp, const GSERIALIZED *gs);
264extern GSERIALIZED *shortestline_tpose_pose(const Temporal *temp, const Pose *pose);
265extern GSERIALIZED *shortestline_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
266
267/*****************************************************************************
268 * Comparison functions
269 *****************************************************************************/
270
271/* Ever/always and temporal comparison functions */
272
273extern int always_eq_pose_tpose(const Pose *pose, const Temporal *temp);
274extern int always_eq_tpose_pose(const Temporal *temp, const Pose *pose);
275extern int always_eq_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
276extern int always_ne_pose_tpose(const Pose *pose, const Temporal *temp);
277extern int always_ne_tpose_pose(const Temporal *temp, const Pose *pose);
278extern int always_ne_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
279extern int ever_eq_pose_tpose(const Pose *pose, const Temporal *temp);
280extern int ever_eq_tpose_pose(const Temporal *temp, const Pose *pose);
281extern int ever_eq_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
282extern int ever_ne_pose_tpose(const Pose *pose, const Temporal *temp);
283extern int ever_ne_tpose_pose(const Temporal *temp, const Pose *pose);
284extern int ever_ne_tpose_tpose(const Temporal *temp1, const Temporal *temp2);
285
286/*****************************************************************************/
287
288extern Temporal *teq_pose_tpose(const Pose *pose, const Temporal *temp);
289extern Temporal *teq_tpose_pose(const Temporal *temp, const Pose *pose);
290extern Temporal *tne_pose_tpose(const Pose *pose, const Temporal *temp);
291extern Temporal *tne_tpose_pose(const Temporal *temp, const Pose *pose);
292
293/*****************************************************************************/
294
295/* Ever and always spatial relationship functions */
296
297
298/*****************************************************************************/
299
300/* Spatiotemporal relationship functions */
301
302
303/*****************************************************************************/
304
305#endif /* __MEOS_POSE_H__ */
double nad_tpose_stbox(const Temporal *temp, const STBox *box)
Return the nearest approach distance of a temporal pose and a spatiotemporal box.
Definition: tpose_distance.c:225
GSERIALIZED * tpose_trajectory(const Temporal *temp)
Return the trajectory of a temporal pose.
Definition: tpose_spatialfuncs.c:61
Set * tpose_points(const Temporal *temp)
Return the array of points of a temporal pose @csqlfn Tpose_points()
Definition: tpose.c:577
Temporal * tpose_rotation(const Temporal *temp)
Return a the rotation of a temporal pose as a temporal float.
Definition: tpose.c:427
Pose * tpose_start_value(const Temporal *temp)
Return a copy of the start value of a temporal pose.
Definition: tpose.c:455
Pose ** tpose_values(const Temporal *temp, int *count)
Return the array of copies of base values of a temporal pose.
Definition: tpose.c:505
bool tpose_value_n(const Temporal *temp, int n, Pose **result)
Return a copy of the n-th value of a temporal pose.
Definition: tpose.c:486
Pose * tpose_end_value(const Temporal *temp)
Return a copy of the end value of a temporal pose.
Definition: tpose.c:470
bool tpose_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, Pose **value)
Return the value of a temporal pose at a timestamptz.
Definition: tpose.c:606
uint32 pose_hash(const Pose *pose)
Return the 32-bit hash value of a pose.
Definition: pose.c:1462
double pose_rotation(const Pose *pose)
Return the rotation of a 2D pose.
Definition: pose.c:926
uint64 pose_hash_extended(const Pose *pose, uint64 seed)
Return the 64-bit hash value of a pose using a seed.
Definition: pose.c:1499
double * pose_orientation(const Pose *pose)
Return the orientation of a 3D pose.
Definition: pose.c:952
STBox * pose_tstzspan_to_stbox(const Pose *pose, const Span *s)
Return a spatiotemporal box constructed from a pose and a timestamptz.
Definition: tpose_boxops.c:249
STBox * pose_timestamptz_to_stbox(const Pose *pose, TimestampTz t)
Return a spatiotemporal box constructed from a pose and a timestamptz.
Definition: tpose_boxops.c:212
bool pose_eq(const Pose *pose1, const Pose *pose2)
Return true if the first pose is equal to the second one.
Definition: pose.c:1292
int pose_cmp(const Pose *pose1, const Pose *pose2)
Return -1, 0, or 1 depending on whether the first pose is less than, equal to, or greater than the se...
Definition: pose.c:1373
bool pose_ge(const Pose *pose1, const Pose *pose2)
Return true if the first pose is greater than or equal to the second one.
Definition: pose.c:1438
bool pose_nsame(const Pose *pose1, const Pose *pose2)
Return true if the first pose is not equal to the second one.
Definition: pose.c:1361
bool pose_le(const Pose *pose1, const Pose *pose2)
Return true if the first pose is less than or equal to the second one.
Definition: pose.c:1415
bool pose_lt(const Pose *pose1, const Pose *pose2)
Return true if the first pose is less than the second one.
Definition: pose.c:1404
bool pose_ne(const Pose *pose1, const Pose *pose2)
Return true if the first pose is not equal to the second one.
Definition: pose.c:1321
bool pose_gt(const Pose *pose1, const Pose *pose2)
Return true if the first pose is greater than the second one.
Definition: pose.c:1426
bool pose_same(const Pose *pose1, const Pose *pose2)
Return true if the first pose is equal to the second one.
Definition: pose.c:1332
Pose * pose_copy(const Pose *pose)
Copy a pose value.
Definition: pose.c:838
Pose * pose_make_2d(double x, double y, double theta, int32_t srid)
Construct a 2D pose value from the arguments.
Definition: pose.c:696
Pose * pose_make_point2d(const GSERIALIZED *gs, double theta)
Construct a 2D pose value from a 2D point and a rotation angle.
Definition: pose.c:724
Pose * pose_make_3d(double x, double y, double z, double W, double X, double Y, double Z, int32_t srid)
Construct a 3D pose value from the arguments.
Definition: pose.c:758
Pose * pose_make_point3d(const GSERIALIZED *gs, double W, double X, double Y, double Z)
Construct a 3D pose value from the arguments.
Definition: pose.c:796
GSERIALIZED * pose_to_point(const Pose *pose)
Convert a pose into a geometry point.
Definition: pose.c:857
STBox * pose_to_stbox(const Pose *pose)
Convert a pose into a spatiotemporal box.
Definition: tpose_boxops.c:102
char * pose_as_ewkt(const Pose *pose, int maxdd)
Return the Extended Well-Known Text (EWKT) representation of a pose.
Definition: pose.c:607
Pose * pose_from_hexwkb(const char *hexwkb)
Return a pose from its ASCII hex-encoded Well-Known Binary (WKB) representation.
Definition: pose.c:640
char * pose_as_hexwkb(const Pose *pose, uint8_t variant, size_t *size)
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a pose.
Definition: pose.c:676
char * pose_out(const Pose *pose, int maxdd)
Return the string representation of a pose.
Definition: pose.c:496
char * pose_as_text(const Pose *pose, int maxdd)
Return the Well-Known Text (WKT) representation of a pose.
Definition: pose.c:594
uint8_t * pose_as_wkb(const Pose *pose, uint8_t variant, size_t *size_out)
Return the Well-Known Binary (WKB) representation of a pose.
Definition: pose.c:659
Pose * pose_from_wkb(const uint8_t *wkb, size_t size)
Return a pose from its Well-Known Binary (WKB) representation.
Definition: pose.c:625
Pose * pose_in(const char *str)
Return a pose from its string representation.
Definition: pose.c:480
Pose * pose_transform(const Pose *pose, int32_t srid)
Return a pose transformed to another SRID.
Definition: pose.c:1140
int32_t pose_srid(const Pose *pose)
Return the SRID.
Definition: pose.c:1055
Pose * pose_transform_pipeline(const Pose *pose, const char *pipelinestr, int32_t srid, bool is_forward)
Return a pose transformed to another SRID using a pipeline.
Definition: pose.c:1172
void pose_set_srid(Pose *pose, int32_t srid)
Set the SRID.
Definition: pose.c:1082
Pose ** posearr_round(const Pose **posearr, int count, int maxdd)
Return an array of poses with the precision of the vales set to a number of decimal places.
Definition: pose.c:1032
Pose * pose_round(const Pose *pose, int maxdd)
Return a pose with the precision of the values set to a number of decimal places.
Definition: pose.c:980
int always_eq_tpose_pose(const Temporal *temp, const Pose *pose)
Return true if a temporal pose is always equal to a pose.
Definition: tpose_compops.c:169
int ever_eq_tpose_pose(const Temporal *temp, const Pose *pose)
Return true if a temporal pose is ever equal to a circular buffer.
Definition: tpose_compops.c:115
int ever_ne_pose_tpose(const Pose *pose, const Temporal *temp)
Return true if a pose is ever different from a temporal pose.
Definition: tpose_compops.c:128
int ever_eq_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal poses are ever equal.
Definition: tpose_compops.c:210
int always_eq_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal poses are always equal.
Definition: tpose_compops.c:234
int always_ne_tpose_pose(const Temporal *temp, const Pose *pose)
Return true if a temporal pose is always different from a pose.
Definition: tpose_compops.c:196
int always_ne_pose_tpose(const Pose *pose, const Temporal *temp)
Return true if a pose is always different from a temporal pose.
Definition: tpose_compops.c:182
int always_eq_pose_tpose(const Pose *pose, const Temporal *temp)
Return true if a pose is always equal to a temporal pose.
Definition: tpose_compops.c:155
int ever_eq_pose_tpose(const Pose *pose, const Temporal *temp)
Return true if a pose is ever equal to a temporal circular buffer.
Definition: tpose_compops.c:101
int always_ne_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal poses are always different.
Definition: tpose_compops.c:246
int ever_ne_tpose_pose(const Temporal *temp, const Pose *pose)
Return true if a temporal pose is ever different from a pose.
Definition: tpose_compops.c:142
int ever_ne_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal poses are ever different.
Definition: tpose_compops.c:222
Temporal * tne_tpose_pose(const Temporal *temp, const Pose *pose)
Return the temporal inequality of a temporal pose and a pose.
Definition: tpose_compops.c:345
Temporal * teq_tpose_pose(const Temporal *temp, const Pose *pose)
Return the temporal equality of a temporal pose and a pose.
Definition: tpose_compops.c:331
Temporal * tne_pose_tpose(const Pose *pose, const Temporal *temp)
Return the temporal inequality of a pose and a temporal pose.
Definition: tpose_compops.c:315
Temporal * teq_pose_tpose(const Pose *pose, const Temporal *temp)
Return the temporal equality of a pose and a temporal pose.
Definition: tpose_compops.c:302
Temporal * tpose_make(const Temporal *tpoint, const Temporal *tradius)
Return a temporal pose from a temporal point and a temporal float.
Definition: tpose.c:357
Temporal * tpose_to_tpoint(const Temporal *temp)
Return a geometry point from a temporal pose.
Definition: tpose.c:402
GSERIALIZED * shortestline_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return the line connecting the nearest approach point between two temporal networks.
Definition: tpose_distance.c:334
GSERIALIZED * shortestline_tpose_pose(const Temporal *temp, const Pose *pose)
Return the line connecting the nearest approach point between a pose and a temporal pose.
Definition: tpose_distance.c:313
Temporal * tdistance_tpose_point(const Temporal *temp, const GSERIALIZED *gs)
Return the temporal distance between a geometry and a temporal pose.
Definition: tpose_distance.c:57
double nad_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance of two temporal poses.
Definition: tpose_distance.c:267
Temporal * tdistance_tpose_pose(const Temporal *temp, const Pose *pose)
Return the temporal distance between a temporal pose and a pose.
Definition: tpose_distance.c:77
Temporal * tdistance_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return the temporal distance between two temporal poses.
Definition: tpose_distance.c:97
double nad_tpose_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the nearest approach distance of two temporal pose and a geometry.
Definition: tpose_distance.c:204
TInstant * nai_tpose_pose(const Temporal *temp, const Pose *pose)
Return the nearest approach instant of a pose and a temporal pose.
Definition: tpose_distance.c:148
GSERIALIZED * shortestline_tpose_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the line connecting the nearest approach point between a geometry and a temporal pose.
Definition: tpose_distance.c:292
TInstant * nai_tpose_tpose(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach instant of two temporal poses.
Definition: tpose_distance.c:173
TInstant * nai_tpose_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the nearest approach instant of the temporal pose and a geometry.
Definition: tpose_distance.c:123
double nad_tpose_pose(const Temporal *temp, const Pose *pose)
Return the nearest approach distance of a temporal pose and a pose.
Definition: tpose_distance.c:247
Temporal * tpose_in(const char *str)
Return a temporal pose from its Well-Known Text (WKT) representation.
Definition: tpose.c:179
Temporal * tpose_minus_pose(const Temporal *temp, const Pose *pose)
Return a temporal pose restricted to the complement of a pose.
Definition: tpose.c:648
Temporal * tpose_at_stbox(const Temporal *temp, const STBox *box, bool border_inc)
Return a temporal pose restricted to a geometry.
Definition: tpose_spatialfuncs.c:177
Temporal * tpose_minus_geom(const Temporal *temp, const GSERIALIZED *gs)
Return a temporal point restricted to (the complement of) a geometry.
Definition: tpose_spatialfuncs.c:126
Temporal * tpose_minus_stbox(const Temporal *temp, const STBox *box, bool border_inc)
Return a temporal point restricted to (the complement of) a geometry.
Definition: tpose_spatialfuncs.c:191
Temporal * tpose_at_geom(const Temporal *temp, const GSERIALIZED *gs)
Return a temporal pose restricted to a geometry.
Definition: tpose_spatialfuncs.c:113
Temporal * tpose_at_pose(const Temporal *temp, const Pose *pose)
Return a temporal pose restricted to a pose.
Definition: tpose.c:632
Pose * poseset_start_value(const Set *s)
Return a copy of the start value of a pose set.
Definition: poseset_meos.c:152
Pose * poseset_end_value(const Set *s)
Return a copy of the end value of a pose set.
Definition: poseset_meos.c:167
Pose ** poseset_values(const Set *s)
Return the array of copies of the values of a pose set.
Definition: poseset_meos.c:203
bool poseset_value_n(const Set *s, int n, Pose **result)
Return in the last argument a copy of the n-th value of a circular buffer set.
Definition: poseset_meos.c:185
Set * poseset_make(const Pose **values, int count)
Return a pose set from an array of values.
Definition: poseset_meos.c:108
Set * pose_to_set(const Pose *pose)
Convert a pose into a pose set.
Definition: poseset_meos.c:132
char * poseset_out(const Set *s, int maxdd)
Return the string representation of a pose set.
Definition: poseset_meos.c:89
Set * poseset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: poseset_meos.c:74
Set * pose_union_transfn(Set *state, const Pose *pose)
Transition function for set union aggregate of poses.
Definition: poseset_meos.c:364
Set * minus_set_pose(const Set *s, const Pose *pose)
Return the difference of a set and a pose.
Definition: poseset_meos.c:345
Set * union_set_pose(const Set *s, const Pose *pose)
Return the union of a set and a pose.
Definition: poseset_meos.c:271
Set * union_pose_set(const Pose *pose, const Set *s)
Return the union of a pose and a set.
Definition: poseset_meos.c:287
Set * minus_pose_set(const Pose *pose, const Set *s)
Return the difference of a pose and a set.
Definition: poseset_meos.c:329
Set * intersection_set_pose(const Set *s, const Pose *pose)
Return the intersection of a set and a pose.
Definition: poseset_meos.c:300
bool contains_set_pose(const Set *s, Pose *pose)
Return true if a set contains a pose.
Definition: poseset_meos.c:239
bool contained_pose_set(const Pose *pose, const Set *s)
Return true if a pose is contained in a set.
Definition: poseset_meos.c:255
Set * intersection_pose_set(const Pose *pose, const Set *s)
Return the intersection of a pose and a set.
Definition: poseset_meos.c:316
External API of the Mobility Engine Open Source (MEOS) library.
double distance_pose_pose(const Pose *pose1, const Pose *pose2)
Return the distance between two poses.
Definition: pose.c:1217
double distance_pose_stbox(const Pose *pose, const STBox *box)
Return the distance between a pose and a spatiotemporal box.
Definition: pose.c:1268
double distance_pose_geo(const Pose *pose, const GSERIALIZED *gs)
Return the distance between a pose and a geometry.
Definition: pose.c:1248
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
unsigned int uint32
Definition: postgres_ext_defs.in.h:16
unsigned long int uint64
Definition: postgres_ext_defs.in.h:17
Definition: postgis_ext_defs.in.h:170
uint8_t srid[3]
srid
Definition: pose.h:59
Basic functions for static pose objects.
Definition: pose.h:56
Structure to represent spatiotemporal boxes.
Definition: meos.h:144
Structure to represent sets of values.
Definition: meos.h:90
Structure to represent spans (a.k.a.
Definition: meos.h:104
Structure to represent temporal values of instant subtype.
Definition: meos.h:195
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:183
int const GSERIALIZED * gs
Definition: trgeo_spatialrels.h:52