MobilityDB 1.3
Loading...
Searching...
No Matches
meos_npoint.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_NPOINT_H__
35#define __MEOS_NPOINT_H__
36
37/* C */
38#include <stdbool.h>
39#include <stdint.h>
40/* MEOS */
41#include <meos.h>
42#include <meos_geo.h>
43#include <meos_internal.h>
44
45/*****************************************************************************
46 * Type definitions
47 *****************************************************************************/
48
49/* Structure to represent network-based points */
50
51typedef struct
52{
54 double pos;
55} Npoint;
56
57/* Structure to represent network-based segments */
58
59typedef struct
60{
62 double pos1;
63 double pos2;
64} Nsegment;
65
66/*****************************************************************************
67 * Validity macros and functions
68 *****************************************************************************/
69
74#if MEOS
75 #define VALIDATE_NPOINTSET(set, ret) \
76 do { \
77 if (! ensure_not_null((void *) (set)) || \
78 ! ensure_set_isof_type((set), T_NPOINTSET) ) \
79 return (ret); \
80 } while (0)
81#else
82 #define VALIDATE_NPOINTSET(set, ret) \
83 do { \
84 assert(set); \
85 assert(set->settype == T_NPOINTSET); \
86 } while (0)
87#endif /* MEOS */
88
95#if MEOS
96 #define VALIDATE_TNPOINT(temp, ret) \
97 do { \
98 if (! ensure_not_null((void *) (temp)) || \
99 ! ensure_temporal_isof_type((Temporal *) (temp), T_TNPOINT) ) \
100 return (ret); \
101 } while (0)
102#else
103 #define VALIDATE_TNPOINT(temp, ret) \
104 do { \
105 assert(temp); \
106 assert(((Temporal *) (temp))->temptype == T_TNPOINT); \
107 } while (0)
108#endif /* MEOS */
109
110/******************************************************************************
111 * Functions for network points
112 ******************************************************************************/
113
114/* Input and output functions */
115
116extern char *npoint_as_ewkt(const Npoint *np, int maxdd);
117extern char *npoint_as_hexwkb(const Npoint *np, uint8_t variant, size_t *size_out);
118extern char *npoint_as_text(const Npoint *np, int maxdd);
119extern uint8_t *npoint_as_wkb(const Npoint *np, uint8_t variant, size_t *size_out);
120extern Npoint *npoint_from_hexwkb(const char *hexwkb);
121extern Npoint *npoint_from_wkb(const uint8_t *wkb, size_t size);
122extern Npoint *npoint_in(const char *str);
123extern char *npoint_out(const Npoint *np, int maxdd);
124extern Nsegment *nsegment_in(const char *str);
125extern char *nsegment_out(const Nsegment *ns, int maxdd);
126
127/* Constructor functions */
128
129extern Npoint *npoint_make(int64 rid, double pos);
130extern Nsegment *nsegment_make(int64 rid, double pos1, double pos2);
131
132/* Conversion functions */
133
134extern Npoint *geom_to_npoint(const GSERIALIZED *gs);
136extern GSERIALIZED *npoint_to_geom(const Npoint *np);
137extern Nsegment *npoint_to_nsegment(const Npoint *np);
138extern STBox *npoint_to_stbox(const Npoint *np);
139extern GSERIALIZED *nsegment_to_geom(const Nsegment *ns);
140extern STBox *nsegment_to_stbox(const Nsegment *np);
141
142/* Accessor functions */
143
144extern uint32 npoint_hash(const Npoint *np);
145extern uint64 npoint_hash_extended(const Npoint *np, uint64 seed);
146extern double npoint_position(const Npoint *np);
147extern int64 npoint_route(const Npoint *np);
148extern double nsegment_end_position(const Nsegment *ns);
149extern int64 nsegment_route(const Nsegment *ns);
150extern double nsegment_start_position(const Nsegment *ns);
151
152/* Route functions */
153
154extern bool route_exists(int64 rid);
155extern GSERIALIZED *route_geom(int64 rid);
156extern double route_length(int64 rid);
157
158/* Transformation functions */
159
160extern Npoint *npoint_round(const Npoint *np, int maxdd);
161extern Nsegment *nsegment_round(const Nsegment *ns, int maxdd);
162
163/* Spatial reference system functions */
164
165extern int32_t get_srid_ways(void);
166extern int32_t npoint_srid(const Npoint *np);
167extern int32_t nsegment_srid(const Nsegment *ns);
168
169/* Bounding box functions */
170
172extern STBox *npoint_tstzspan_to_stbox(const Npoint *np, const Span *s);
173
174/* Comparison functions */
175
176extern int npoint_cmp(const Npoint *np1, const Npoint *np2);
177extern bool npoint_eq(const Npoint *np1, const Npoint *np2);
178extern bool npoint_ge(const Npoint *np1, const Npoint *np2);
179extern bool npoint_gt(const Npoint *np1, const Npoint *np2);
180extern bool npoint_le(const Npoint *np1, const Npoint *np2);
181extern bool npoint_lt(const Npoint *np1, const Npoint *np2);
182extern bool npoint_ne(const Npoint *np1, const Npoint *np2);
183extern bool npoint_same(const Npoint *np1, const Npoint *np2);
184extern int nsegment_cmp(const Nsegment *ns1, const Nsegment *ns2);
185extern bool nsegment_eq(const Nsegment *ns1, const Nsegment *ns2);
186extern bool nsegment_ge(const Nsegment *ns1, const Nsegment *ns2);
187extern bool nsegment_gt(const Nsegment *ns1, const Nsegment *ns2);
188extern bool nsegment_le(const Nsegment *ns1, const Nsegment *ns2);
189extern bool nsegment_lt(const Nsegment *ns1, const Nsegment *ns2);
190extern bool nsegment_ne(const Nsegment *ns1, const Nsegment *ns2);
191
192/******************************************************************************
193 * Functions for network point sets
194 ******************************************************************************/
195
196/* Input and output functions */
197
198extern Set *npointset_in(const char *str);
199extern char *npointset_out(const Set *s, int maxdd);
200
201/* Constructor functions */
202
203extern Set *npointset_make(const Npoint **values, int count);
204
205/* Conversion functions */
206
207extern Set *npoint_to_set(const Npoint *np);
208
209/* Accessor functions */
210
211extern Npoint *npointset_end_value(const Set *s);
212extern Set *npointset_routes(const Set *s);
213extern Npoint *npointset_start_value(const Set *s);
214extern bool npointset_value_n(const Set *s, int n, Npoint **result);
215extern Npoint **npointset_values(const Set *s);
216
217/* Set operations */
218
219extern bool contained_npoint_set(const Npoint *np, const Set *s);
220extern bool contains_set_npoint(const Set *s, Npoint *np);
221extern Set *intersection_npoint_set(const Npoint *np, const Set *s);
222extern Set *intersection_set_npoint(const Set *s, const Npoint *np);
223extern Set *minus_npoint_set(const Npoint *np, const Set *s);
224extern Set *minus_set_npoint(const Set *s, const Npoint *np);
225extern Set *npoint_union_transfn(Set *state, const Npoint *np);
226extern Set *union_npoint_set(const Npoint *np, const Set *s);
227extern Set *union_set_npoint(const Set *s, const Npoint *np);
228
229/*===========================================================================*
230 * Functions for temporal network points
231 *===========================================================================*/
232
233/*****************************************************************************
234 * Input/output functions
235 *****************************************************************************/
236
237extern Temporal *tnpoint_in(const char *str);
238extern char *tnpoint_out(const Temporal *temp, int maxdd);
239
240/*****************************************************************************
241 * Conversion function
242 *****************************************************************************/
243
244extern Temporal *tgeompoint_to_tnpoint(const Temporal *temp);
245extern Temporal *tnpoint_to_tgeompoint(const Temporal *temp);
246
247/*****************************************************************************
248 * Accessor function
249 *****************************************************************************/
250
251extern Temporal *tnpoint_cumulative_length(const Temporal *temp);
252extern double tnpoint_length(const Temporal *temp);
253extern Nsegment **tnpoint_positions(const Temporal *temp, int *count);
254extern int64 tnpoint_route(const Temporal *temp);
255extern Set *tnpoint_routes(const Temporal *temp);
256extern Temporal *tnpoint_speed(const Temporal *temp);
257extern GSERIALIZED *tnpoint_trajectory(const Temporal *temp);
258extern GSERIALIZED *tnpoint_twcentroid(const Temporal *temp);
259
260/*****************************************************************************
261 * Restriction functions
262 *****************************************************************************/
263
264extern Temporal *tnpoint_at_geom(const Temporal *temp, const GSERIALIZED *gs);
265extern Temporal *tnpoint_at_npoint(const Temporal *temp, const Npoint *np);
266extern Temporal *tnpoint_at_npointset(const Temporal *temp, const Set *s);
267extern Temporal *tnpoint_at_stbox(const Temporal *temp, const STBox *box, bool border_inc);
268extern Temporal *tnpoint_minus_geom(const Temporal *temp, const GSERIALIZED *gs);
269extern Temporal *tnpoint_minus_npoint(const Temporal *temp, const Npoint *np);
270extern Temporal *tnpoint_minus_npointset(const Temporal *temp, const Set *s);
271extern Temporal *tnpoint_minus_stbox(const Temporal *temp, const STBox *box, bool border_inc);
272
273/*****************************************************************************
274 * Distance functions
275 *****************************************************************************/
276
277extern Temporal *distance_tnpoint_npoint(const Temporal *temp, const Npoint *np);
278extern Temporal *distance_tnpoint_point(const Temporal *temp, const GSERIALIZED *gs);
279extern Temporal *distance_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
280extern double nad_tnpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
281extern double nad_tnpoint_npoint(const Temporal *temp, const Npoint *np);
282extern double nad_tnpoint_stbox(const Temporal *temp, const STBox *box);
283extern double nad_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
284extern TInstant *nai_tnpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
285extern TInstant *nai_tnpoint_npoint(const Temporal *temp, const Npoint *np);
286extern TInstant *nai_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
287extern GSERIALIZED *shortestline_tnpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
288extern GSERIALIZED *shortestline_tnpoint_npoint(const Temporal *temp, const Npoint *np);
289extern GSERIALIZED *shortestline_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
290
291/*****************************************************************************
292 * Aggregate functions
293 *****************************************************************************/
294
296
297/*****************************************************************************
298 * Comparison functions
299 *****************************************************************************/
300
301/* Ever/always comparisons */
302
303extern int always_eq_npoint_tnpoint(const Npoint *np, const Temporal *temp);
304extern int always_eq_tnpoint_npoint(const Temporal *temp, const Npoint *np);
305extern int always_eq_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
306extern int always_ne_npoint_tnpoint(const Npoint *np, const Temporal *temp);
307extern int always_ne_tnpoint_npoint(const Temporal *temp, const Npoint *np);
308extern int always_ne_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
309extern int ever_eq_npoint_tnpoint(const Npoint *np, const Temporal *temp);
310extern int ever_eq_tnpoint_npoint(const Temporal *temp, const Npoint *np);
311extern int ever_eq_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
312extern int ever_ne_npoint_tnpoint(const Npoint *np, const Temporal *temp);
313extern int ever_ne_tnpoint_npoint(const Temporal *temp, const Npoint *np);
314extern int ever_ne_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2);
315
316/* Temporal comparisons */
317
318extern Temporal *teq_tnpoint_npoint(const Temporal *temp, const Npoint *np);
319extern Temporal *tne_tnpoint_npoint(const Temporal *temp, const Npoint *np);
320
321/*****************************************************************************/
322
323#endif
double tnpoint_length(const Temporal *temp)
Length traversed by a temporal network point.
Definition: tnpoint_spatialfuncs.c:322
Nsegment ** tnpoint_positions(const Temporal *temp, int *count)
Return the network segments covered by the temporal network point @csqlfn Tnpoint_positions()
Definition: tnpoint.c:569
Set * tnpoint_routes(const Temporal *temp)
Return the array of routes of a temporal network point @csqlfn Tnpoint_routes()
Definition: tnpoint.c:684
GSERIALIZED * tnpoint_twcentroid(const Temporal *temp)
Return the time-weighed centroid of a temporal network point.
Definition: tnpoint_spatialfuncs.c:512
Temporal * tnpoint_speed(const Temporal *temp)
Speed of a temporal network point.
Definition: tnpoint_spatialfuncs.c:482
Temporal * tnpoint_cumulative_length(const Temporal *temp)
Cumulative length traversed by a temporal network point.
Definition: tnpoint_spatialfuncs.c:399
GSERIALIZED * tnpoint_trajectory(const Temporal *temp)
Return the geometry covered by a temporal network point.
Definition: tnpoint_spatialfuncs.c:229
int64 tnpoint_route(const Temporal *temp)
Return the single route of a temporal network point.
Definition: tnpoint.c:606
SkipList * tnpoint_tcentroid_transfn(SkipList *state, Temporal *temp)
Transition function for temporal centroid aggregation of temporal network points.
Definition: tnpoint_aggfuncs.c:59
uint32 npoint_hash(const Npoint *np)
Return the 32-bit hash value of a network point.
Definition: npoint.c:1907
double npoint_position(const Npoint *np)
Return the position of a network point.
Definition: npoint.c:1596
int64 nsegment_route(const Nsegment *ns)
Return the route of a network segment.
Definition: npoint.c:1610
double nsegment_end_position(const Nsegment *ns)
Return the end position of a network segment.
Definition: npoint.c:1638
uint64 npoint_hash_extended(const Npoint *np, uint64 seed)
Return the 64-bit hash value of a network point using a seed.
Definition: npoint.c:1930
double nsegment_start_position(const Nsegment *ns)
Return the start position of a network segment.
Definition: npoint.c:1624
int64 npoint_route(const Npoint *np)
Return the route of a network point.
Definition: npoint.c:1581
bool nsegment_ne(const Nsegment *ns1, const Nsegment *ns2)
Return true if the first network segment is not equal to the second one.
Definition: npoint.c:1809
int npoint_cmp(const Npoint *np1, const Npoint *np2)
Return -1, 0, or 1 depending on whether the first network point is less than, equal to,...
Definition: npoint.c:1717
bool nsegment_gt(const Nsegment *ns1, const Nsegment *ns2)
Return true if the first network segment is greater than the second one.
Definition: npoint.c:1877
bool npoint_lt(const Npoint *np1, const Npoint *np2)
Return true if the first network point is less than the second one.
Definition: npoint.c:1741
bool npoint_ge(const Npoint *np1, const Npoint *np2)
Return true if the first network point is greater than or equal to the second one.
Definition: npoint.c:1779
bool nsegment_le(const Nsegment *ns1, const Nsegment *ns2)
Return true if the first network segment is less than or equal to the second one.
Definition: npoint.c:1864
bool npoint_same(const Npoint *np1, const Npoint *np2)
Return true if two network points are approximately equal with respect to an epsilon value.
Definition: tnpoint_spatialfuncs.c:259
bool nsegment_eq(const Nsegment *ns1, const Nsegment *ns2)
Return true if the first network segment is equal to the second one.
Definition: npoint.c:1793
bool npoint_le(const Npoint *np1, const Npoint *np2)
Return true if the first network point is less than or equal to the second one.
Definition: npoint.c:1754
bool npoint_gt(const Npoint *np1, const Npoint *np2)
Return true if the first network point is greater than the second one.
Definition: npoint.c:1766
bool npoint_eq(const Npoint *np1, const Npoint *np2)
Return true if the first network point is equal to the second one.
Definition: npoint.c:1690
int nsegment_cmp(const Nsegment *ns1, const Nsegment *ns2)
Return -1, 0, or 1 depending on whether the first network segment is less than, equal to,...
Definition: npoint.c:1822
bool npoint_ne(const Npoint *np1, const Npoint *np2)
Return true if the first network point is not equal to the second one.
Definition: npoint.c:1704
bool nsegment_lt(const Nsegment *ns1, const Nsegment *ns2)
Return true if the first network segment is less than the second one.
Definition: npoint.c:1851
bool nsegment_ge(const Nsegment *ns1, const Nsegment *ns2)
Return true if the first network segment is greater than or equal to the second one.
Definition: npoint.c:1890
Npoint * npoint_make(int64 rid, double pos)
Return a network point from a route identifier and a position.
Definition: npoint.c:1112
Nsegment * nsegment_make(int64 rid, double pos1, double pos2)
Return a network segment from a route identifier and two positions.
Definition: npoint.c:1148
Nsegment * geom_to_nsegment(const GSERIALIZED *gs)
Transform a geometry into a network segment.
Definition: npoint.c:1401
GSERIALIZED * nsegment_to_geom(const Nsegment *ns)
Transform a network segment into a geometry.
Definition: npoint.c:1379
Npoint * geom_to_npoint(const GSERIALIZED *gs)
Transform a geometry into a network point.
Definition: npoint.c:527
Nsegment * npoint_to_nsegment(const Npoint *np)
Convert a network point into a network segment.
Definition: npoint.c:1188
STBox * nsegment_to_stbox(const Nsegment *np)
Convert a network segment into a spatiotemporal box.
Definition: npoint.c:1272
STBox * npoint_to_stbox(const Npoint *np)
Convert a network point into a spatiotemporal box.
Definition: npoint.c:1221
GSERIALIZED * npoint_to_geom(const Npoint *np)
Transform a network point into a geometry.
Definition: npoint.c:1362
char * npoint_as_text(const Npoint *np, int maxdd)
Return the Well-Known Text (WKT) representation of a network point.
Definition: npoint.c:984
Nsegment * nsegment_in(const char *str)
Return a network point from its string representation.
Definition: npoint.c:922
char * npoint_out(const Npoint *np, int maxdd)
Return the string representation of a network point.
Definition: npoint.c:833
Npoint * npoint_from_wkb(const uint8_t *wkb, size_t size)
Return a network point from its Well-Known Binary (WKB) representation.
Definition: npoint.c:1038
uint8_t * npoint_as_wkb(const Npoint *np, uint8_t variant, size_t *size_out)
Return the Well-Known Binary (WKB) representation of a circular buffer.
Definition: npoint.c:1074
Npoint * npoint_from_hexwkb(const char *hexwkb)
Return a network point from its ASCII hex-encoded Well-Known Binary (WKB) representation.
Definition: npoint.c:1053
char * npoint_as_ewkt(const Npoint *np, int maxdd)
Return the Extended Well-Known Text (EWKT) representation of a network point.
Definition: npoint.c:1003
Npoint * npoint_in(const char *str)
Return a network point from its string representation.
Definition: npoint.c:818
char * nsegment_out(const Nsegment *ns, int maxdd)
Return the string representation of a network segment.
Definition: npoint.c:937
char * npoint_as_hexwkb(const Npoint *np, uint8_t variant, size_t *size_out)
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a network point.
Definition: npoint.c:1091
double route_length(int64 rid)
Access the edge table to return the route length from the corresponding route identifier.
Definition: npoint.c:317
bool route_exists(int64 rid)
Return true if the edge table contains a route with the route identifier.
Definition: npoint.c:234
GSERIALIZED * route_geom(int64 rid)
Access the edge table to get the route geometry from corresponding route identifier.
Definition: npoint.c:413
int32_t get_srid_ways(void)
Return the SRID of the routes in the ways table.
Definition: npoint.c:124
Nsegment * nsegment_round(const Nsegment *ns, int maxdd)
Return a network segment with the precision of the positions set to a number of decimal places.
Definition: npoint.c:1561
Npoint * npoint_round(const Npoint *np, int maxdd)
Return a network point with the precision of the position set to a number of decimal places.
Definition: npoint.c:1533
int always_eq_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return true if a temporal network point is always equal to a network point.
Definition: tnpoint_compops.c:165
int ever_eq_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return true if a temporal network point is ever equal to a network point.
Definition: tnpoint_compops.c:109
int always_ne_npoint_tnpoint(const Npoint *np, const Temporal *temp)
Return true if a network point is always different from a temporal network point.
Definition: tnpoint_compops.c:179
int ever_eq_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal network points are ever equal.
Definition: tnpoint_compops.c:207
int ever_eq_npoint_tnpoint(const Npoint *np, const Temporal *temp)
Return true if a network point is ever equal to a temporal network point.
Definition: tnpoint_compops.c:95
int always_ne_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal network points are always different.
Definition: tnpoint_compops.c:243
int ever_ne_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return true if a temporal network point is ever different from a network point.
Definition: tnpoint_compops.c:137
int always_eq_npoint_tnpoint(const Npoint *np, const Temporal *temp)
Return true if a network point is always equal to a temporal network point.
Definition: tnpoint_compops.c:151
int always_eq_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal network points are always equal.
Definition: tnpoint_compops.c:231
int ever_ne_npoint_tnpoint(const Npoint *np, const Temporal *temp)
Return true if a network point is ever different from a temporal network point.
Definition: tnpoint_compops.c:123
int always_ne_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return true if a temporal network point is always different from a network point.
Definition: tnpoint_compops.c:193
int ever_ne_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal network points are ever different.
Definition: tnpoint_compops.c:219
Temporal * tne_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return the temporal inequality of a temporal network point and a network point.
Definition: tnpoint_compops.c:295
Temporal * teq_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return the temporal equality of a temporal network point and a network point.
Definition: tnpoint_compops.c:281
Temporal * tgeompoint_to_tnpoint(const Temporal *temp)
Convert a temporal geometry point into a temporal network point.
Definition: tnpoint.c:422
Temporal * tnpoint_to_tgeompoint(const Temporal *temp)
Convert a temporal network point into a temporal geometry point.
Definition: tnpoint.c:338
Temporal * distance_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return the temporal distance between a temporal network point and a network point.
Definition: tnpoint_distance.c:95
double nad_tnpoint_stbox(const Temporal *temp, const STBox *box)
Return the nearest approach distance of a temporal network point and a spatiotemporal box.
Definition: tnpoint_distance.c:244
GSERIALIZED * shortestline_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return the line connecting the nearest approach point between a network point and a temporal network ...
Definition: tnpoint_distance.c:333
GSERIALIZED * shortestline_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return the line connecting the nearest approach point between two temporal networks.
Definition: tnpoint_distance.c:354
double nad_tnpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the nearest approach distance of a temporal network point and a geometry.
Definition: tnpoint_distance.c:223
double nad_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return the nearest approach distance of a temporal network point and a network point.
Definition: tnpoint_distance.c:267
Temporal * distance_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return the temporal distance between two temporal network points.
Definition: tnpoint_distance.c:115
GSERIALIZED * shortestline_tnpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the line connecting the nearest approach point between a geometry and a temporal network point...
Definition: tnpoint_distance.c:312
double nad_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance of two temporal network points.
Definition: tnpoint_distance.c:287
Temporal * distance_tnpoint_point(const Temporal *temp, const GSERIALIZED *gs)
Return the temporal distance between a geometry point and a temporal network point @csqlfn Distance_t...
Definition: tnpoint_distance.c:73
TInstant * nai_tnpoint_npoint(const Temporal *temp, const Npoint *np)
Return the nearest approach instant of the network point and a temporal network point.
Definition: tnpoint_distance.c:167
TInstant * nai_tnpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Return the nearest approach instant of the temporal network point and a geometry.
Definition: tnpoint_distance.c:141
TInstant * nai_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach instant of two temporal network points.
Definition: tnpoint_distance.c:192
Temporal * tnpoint_in(const char *str)
Return a temporal network point from its Well-Known Text (WKT) representation.
Definition: tnpoint.c:189
char * tnpoint_out(const Temporal *temp, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal network point.
Definition: tnpoint.c:204
Temporal * tnpoint_at_npoint(const Temporal *temp, const Npoint *np)
Restrict a temporal network point to a network point.
Definition: tnpoint.c:763
Temporal * tnpoint_minus_geom(const Temporal *temp, const GSERIALIZED *gs)
Return a temporal point restricted to (the complement of) a geometry.
Definition: tnpoint_spatialfuncs.c:582
Temporal * tnpoint_at_geom(const Temporal *temp, const GSERIALIZED *gs)
Return a temporal network point restricted to a geometry.
Definition: tnpoint_spatialfuncs.c:569
Temporal * tnpoint_at_npointset(const Temporal *temp, const Set *s)
Restrict a temporal network point to a set of network points.
Definition: tnpoint.c:813
Temporal * tnpoint_at_stbox(const Temporal *temp, const STBox *box, bool border_inc)
Return a temporal network point restricted to a geometry.
Definition: tnpoint_spatialfuncs.c:626
Temporal * tnpoint_minus_stbox(const Temporal *temp, const STBox *box, bool border_inc)
Return a temporal point restricted to (the complement of) a geometry.
Definition: tnpoint_spatialfuncs.c:640
Temporal * tnpoint_minus_npoint(const Temporal *temp, const Npoint *np)
Restrict a temporal network point to the complement of a network point.
Definition: tnpoint.c:776
Temporal * tnpoint_minus_npointset(const Temporal *temp, const Set *s)
Restrict a temporal network point to the complement of a set of network points.
Definition: tnpoint.c:827
Npoint * npointset_end_value(const Set *s)
Return a copy of the end value of a network point set.
Definition: npointset_meos.c:154
Npoint ** npointset_values(const Set *s)
Return the array of copies of the values of a network point set.
Definition: npointset_meos.c:190
Npoint * npointset_start_value(const Set *s)
Return a copy of the start value of a network point set.
Definition: npointset_meos.c:139
Set * npointset_routes(const Set *s)
Return the routes of a network point set.
Definition: tnpoint.c:712
bool npointset_value_n(const Set *s, int n, Npoint **result)
Return in the last argument a copy of the n-th value of a circular buffer set.
Definition: npointset_meos.c:172
Set * npointset_make(const Npoint **values, int count)
Return a network point set from an array of values.
Definition: npointset_meos.c:95
Set * npoint_to_set(const Npoint *np)
Convert a network point into a network point set.
Definition: npointset_meos.c:119
Set * npointset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: npointset_meos.c:61
char * npointset_out(const Set *s, int maxdd)
Return the string representation of a network point set.
Definition: npointset_meos.c:76
Set * intersection_set_npoint(const Set *s, const Npoint *np)
Return the intersection of a set and a network point.
Definition: npointset_meos.c:287
Set * npoint_union_transfn(Set *state, const Npoint *np)
Transition function for set union aggregate of network points.
Definition: npointset_meos.c:351
Set * union_npoint_set(const Npoint *np, const Set *s)
Return the union of a network point and a set.
Definition: npointset_meos.c:274
Set * union_set_npoint(const Set *s, const Npoint *np)
Return the union of a set and a network point.
Definition: npointset_meos.c:258
Set * minus_npoint_set(const Npoint *np, const Set *s)
Return the difference of a network point and a set.
Definition: npointset_meos.c:316
bool contains_set_npoint(const Set *s, Npoint *np)
Return true if a set contains a network point.
Definition: npointset_meos.c:226
Set * intersection_npoint_set(const Npoint *np, const Set *s)
Return the intersection of a network point and a set.
Definition: npointset_meos.c:303
Set * minus_set_npoint(const Set *s, const Npoint *np)
Return the difference of a set and a network point.
Definition: npointset_meos.c:332
bool contained_npoint_set(const Npoint *np, const Set *s)
Return true if a network point is contained in a set.
Definition: npointset_meos.c:242
External API of the Mobility Engine Open Source (MEOS) library.
int32_t nsegment_srid(const Nsegment *ns)
STBox * npoint_tstzspan_to_stbox(const Npoint *np, const Span *s)
Return a spatiotemporal box constructed from a network point and a timestamptz.
Definition: npoint.c:1342
int32_t npoint_srid(const Npoint *np)
STBox * npoint_timestamptz_to_stbox(const Npoint *np, TimestampTz t)
Return a spatiotemporal box constructed from a network point and a timestamptz.
Definition: npoint.c:1308
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
long int int64
Definition: postgres_ext_defs.in.h:12
Definition: postgis_ext_defs.in.h:170
int64 rid
route identifier
Definition: meos_npoint.h:53
double pos
position
Definition: meos_npoint.h:54
API of the Mobility Engine Open Source (MEOS) library.
Definition: meos_npoint.h:52
double pos2
position2
Definition: meos_npoint.h:63
double pos1
position1
Definition: meos_npoint.h:62
int64 rid
route identifier
Definition: meos_npoint.h:61
Definition: meos_npoint.h:60
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
Structure to represent sets of values.
Definition: meos.h:80
Structure to represent skiplists that keep the current state of an aggregation.
Definition: meos.h:272
Structure to represent spans (a.k.a.
Definition: meos.h:94
Structure to represent temporal values of instant subtype.
Definition: meos.h:185
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
Definition: pgtz.h:42
int const GSERIALIZED * gs
Definition: trgeo_spatialrels.h:52