MobilityDB
1.3
Loading...
Searching...
No Matches
meos
include
rgeo
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
68
typedef
struct
{
69
LWGEOM
*
geom_1
;
70
LWGEOM
*
geom_2
;
71
Pose
*
pose_1
;
72
Pose
*
pose_2
;
73
bool
free_pose_1
;
74
bool
free_pose_2
;
75
uint32_t
cf_1
;
76
uint32_t
cf_2
;
77
TimestampTz
t
;
78
bool
store
;
79
}
cfp_elem
;
80
81
/* List of CFPs */
82
83
typedef
struct
{
84
size_t
count
;
85
size_t
size
;
86
cfp_elem
*
arr
;
87
}
cfp_array
;
88
89
/* Closest features pair */
90
91
typedef
struct
{
92
double
dist
;;
93
TimestampTz
t
;
94
}
tdist_elem
;
95
96
/* List of CFPs */
97
98
typedef
struct
{
99
size_t
count
;
100
size_t
size
;
101
tdist_elem
*
arr
;
102
}
tdist_array
;
103
104
/*****************************************************************************/
105
106
#endif
/* __TRGEO_DISTANCE_H__ */
pose.h
postgres.h
TimestampTz
int64 TimestampTz
Definition:
postgres_ext_defs.in.h:22
LWGEOM
Definition:
postgis_ext_defs.in.h:184
Pose
Basic functions for static pose objects.
Definition:
pose.h:56
cfp_array::count
size_t count
Definition:
trgeo_distance.h:84
cfp_array::size
size_t size
Definition:
trgeo_distance.h:85
cfp_array::arr
cfp_elem * arr
Definition:
trgeo_distance.h:86
cfp_array
Definition:
trgeo_distance.h:83
cfp_elem::cf_1
uint32_t cf_1
Definition:
trgeo_distance.h:75
cfp_elem::free_pose_2
bool free_pose_2
Definition:
trgeo_distance.h:74
cfp_elem::geom_1
LWGEOM * geom_1
Definition:
trgeo_distance.h:69
cfp_elem::t
TimestampTz t
Definition:
trgeo_distance.h:77
cfp_elem::geom_2
LWGEOM * geom_2
Definition:
trgeo_distance.h:70
cfp_elem::pose_2
Pose * pose_2
Definition:
trgeo_distance.h:72
cfp_elem::pose_1
Pose * pose_1
Definition:
trgeo_distance.h:71
cfp_elem::store
bool store
Definition:
trgeo_distance.h:78
cfp_elem::cf_2
uint32_t cf_2
Definition:
trgeo_distance.h:76
cfp_elem::free_pose_1
bool free_pose_1
Definition:
trgeo_distance.h:73
cfp_elem
Definition:
trgeo_distance.h:68
tdist_array::arr
tdist_elem * arr
Definition:
trgeo_distance.h:101
tdist_array::size
size_t size
Definition:
trgeo_distance.h:100
tdist_array::count
size_t count
Definition:
trgeo_distance.h:99
tdist_array
Definition:
trgeo_distance.h:98
tdist_elem::dist
double dist
Definition:
trgeo_distance.h:92
tdist_elem::t
TimestampTz t
Definition:
trgeo_distance.h:93
tdist_elem
Definition:
trgeo_distance.h:91
Generated by
1.9.5