MobilityDB 1.1
tnpoint_boxops.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * This MobilityDB code is provided under The PostgreSQL License.
4 * Copyright (c) 2016-2023, 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-2023, 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 __TNPOINT_BOXOPS_H__
35#define __TNPOINT_BOXOPS_H__
36
37/* PostgreSQL */
38#include <postgres.h>
39/* PostgreSQL */
40#include "general/temporal.h"
41#include "npoint/tnpoint.h"
42
43/*****************************************************************************/
44
45extern bool npoint_set_stbox(const Npoint *np, STBox *box);
46extern void npointarr_set_stbox(const Datum *values, int count, STBox *box);
47extern bool nsegment_set_stbox(const Nsegment *ns, STBox *box);
48extern bool npoint_timestamp_set_stbox(const Npoint *np, TimestampTz t,
49 STBox *box);
50extern bool npoint_period_set_stbox(const Npoint *np, const Span *p,
51 STBox *box);
52
53extern void tnpointinst_set_stbox(const TInstant *inst, STBox *box);
54extern void tnpointinstarr_set_stbox(const TInstant **inst, int count,
55 interpType interp, STBox *box);
56extern void tnpointseq_expand_stbox(const TSequence *seq, TInstant *inst);
57
58/*****************************************************************************/
59
60extern int boxop_tnpoint_geo(const Temporal *temp, const GSERIALIZED *geo,
61 bool (*func)(const STBox *, const STBox *), bool invert);
62extern int boxop_tnpoint_stbox(const Temporal *temp, const STBox *box,
63 bool (*func)(const STBox *, const STBox *), bool spatial, bool invert);
64extern bool boxop_tnpoint_npoint(const Temporal *temp, const Npoint *np,
65 bool (*func)(const STBox *, const STBox *), bool invert);
66extern bool boxop_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2,
67 bool (*func)(const STBox *, const STBox *));
68
69/*****************************************************************************/
70
71#endif /* __TNPOINT_BOXOPS_H__ */
bool npoint_period_set_stbox(const Npoint *np, const Span *p, STBox *box)
Transform a network point and a period to a spatiotemporal box.
Definition: tnpoint_boxops.c:252
bool boxop_tnpoint_npoint(const Temporal *temp, const Npoint *np, bool(*func)(const STBox *, const STBox *), bool invert)
int boxop_tnpoint_stbox(const Temporal *temp, const STBox *box, bool(*func)(const STBox *, const STBox *), bool spatial, bool invert)
int boxop_tnpoint_geo(const Temporal *temp, const GSERIALIZED *geo, bool(*func)(const STBox *, const STBox *), bool invert)
void tnpointinstarr_set_stbox(const TInstant **inst, int count, interpType interp, STBox *box)
Set the spatiotemporal box from the array of temporal network point values.
Definition: tnpoint_boxops.c:172
void tnpointseq_expand_stbox(const TSequence *seq, TInstant *inst)
bool nsegment_set_stbox(const Nsegment *ns, STBox *box)
Return the bounding box of the network segment value.
Definition: tnpoint_boxops.c:227
void npointarr_set_stbox(const Datum *values, int count, STBox *box)
Set the spatiotemporal box from an array of network point values.
Definition: tnpoint_boxops.c:82
bool npoint_set_stbox(const Npoint *np, STBox *box)
Bounding box operators for temporal network points.
Definition: tnpoint_boxops.c:67
bool boxop_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2, bool(*func)(const STBox *, const STBox *))
bool npoint_timestamp_set_stbox(const Npoint *np, TimestampTz t, STBox *box)
Transform a network point and a timestamp to a spatiotemporal box.
Definition: tnpoint_boxops.c:239
void tnpointinst_set_stbox(const TInstant *inst, STBox *box)
Set the spatiotemporal box from the network point value.
Definition: tnpoint_boxops.c:99
interpType
Enumeration that defines the interpolation types used in MobilityDB.
Definition: meos.h:124
int64 TimestampTz
Definition: pg_ext_defs.in.h:19
uintptr_t Datum
Definition: pg_ext_defs.in.h:4
Definition: postgis_ext_defs.in.h:139
Functions for temporal network points.
Definition: tnpoint.h:50
Definition: tnpoint.h:58
Structure to represent spatiotemporal boxes.
Definition: meos.h:107
Structure to represent spans (a.k.a.
Definition: meos.h:70
Structure to represent temporal values of instant subtype.
Definition: meos.h:148
Structure to represent temporal values of instant set or sequence subtype.
Definition: meos.h:165
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:136