MobilityDB 1.3
Loading...
Searching...
No Matches
trgeo_distance.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_DISTANCE_H__
36#define __TRGEO_DISTANCE_H__
37
38/* PostgreSQL */
39#include <postgres.h>
40/* PostGIS */
41#include <liblwgeom.h>
42/* MEOS */
43#include "temporal/temporal.h"
44#include "pose/pose.h"
45
46/*****************************************************************************
47 * Struct definitions
48 *****************************************************************************/
49
51#define MEOS_ANY 0
52#define MEOS_RIGHT 1
53#define MEOS_LEFT 2
54
56#define MEOS_SOLVE_0 true
57#define MEOS_SOLVE_1 false
58
60#define MEOS_CFP_STORE true
61#define MEOS_CFP_STORE_NO false
62
63#define MEOS_CFP_FREE true
64#define MEOS_CFP_FREE_NO false
65
66/* Closest features pair */
67
68typedef struct {
75 uint32_t cf_1;
76 uint32_t cf_2;
78 bool store;
79} cfp_elem;
80
81/* List of CFPs */
82
83typedef struct {
84 size_t count;
85 size_t size;
87} cfp_array;
88
89/* Closest features pair */
90
91typedef struct {
92 double dist;;
95
96/* List of CFPs */
97
98typedef struct {
99 size_t count;
100 size_t size;
103
104/*****************************************************************************/
105
106#endif /* __TRGEO_DISTANCE_H__ */
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
Definition: postgis_ext_defs.in.h:184
Basic functions for static pose objects.
Definition: pose.h:56
size_t count
Definition: trgeo_distance.h:84
size_t size
Definition: trgeo_distance.h:85
cfp_elem * arr
Definition: trgeo_distance.h:86
Definition: trgeo_distance.h:83
uint32_t cf_1
Definition: trgeo_distance.h:75
bool free_pose_2
Definition: trgeo_distance.h:74
LWGEOM * geom_1
Definition: trgeo_distance.h:69
TimestampTz t
Definition: trgeo_distance.h:77
LWGEOM * geom_2
Definition: trgeo_distance.h:70
Pose * pose_2
Definition: trgeo_distance.h:72
Pose * pose_1
Definition: trgeo_distance.h:71
bool store
Definition: trgeo_distance.h:78
uint32_t cf_2
Definition: trgeo_distance.h:76
bool free_pose_1
Definition: trgeo_distance.h:73
Definition: trgeo_distance.h:68
tdist_elem * arr
Definition: trgeo_distance.h:101
size_t size
Definition: trgeo_distance.h:100
size_t count
Definition: trgeo_distance.h:99
Definition: trgeo_distance.h:98
double dist
Definition: trgeo_distance.h:92
TimestampTz t
Definition: trgeo_distance.h:93
Definition: trgeo_distance.h:91