MobilityDB 1.3
Loading...
Searching...
No Matches
tspatial_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-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 __TSPATIAL_BOXOPS_H__
35#define __TSPATIAL_BOXOPS_H__
36
37/* PostgreSQL */
38#include <postgres.h>
39/* PostGIS */
40#include <liblwgeom.h>
41/* MEOS */
42#include <meos.h>
43#include "temporal/meos_catalog.h"
44
45/*****************************************************************************/
46
47/* Functions computing the bounding box at the creation of a temporal point */
48
49extern void tgeoinst_set_stbox(const TInstant *inst, STBox *box);
50extern void tgeoinstarr_set_stbox(const TInstant **instants, int count,
51 STBox *box);
52extern void tgeoseq_expand_stbox(TSequence *seq, const TInstant *inst);
53
54extern void tspatialinst_set_stbox(const TInstant *inst, STBox *box);
55extern void tspatialinstarr_set_stbox(const TInstant **instants, int count,
56 bool lower_inc, bool upper_inc, interpType interp, void *box);
57extern void tspatialseqarr_set_stbox(const TSequence **sequences, int count,
58 STBox *box);
59extern void tspatialseq_expand_stbox(TSequence *seq, const TInstant *inst);
60
61extern void spatialarr_set_bbox(const Datum *values, meosType basetype,
62 int count, void *box);
63
64/* Generic box functions */
65
66extern bool boxop_tspatial_stbox(const Temporal *temp, const STBox *box,
67 bool (*func)(const STBox *, const STBox *), bool invert);
68extern bool boxop_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2,
69 bool (*func)(const STBox *, const STBox *));
70
71/*****************************************************************************/
72
73#endif /* __TSPATIAL_BOXOPS_H__ */
void tspatialseq_expand_stbox(TSequence *seq, const TInstant *inst)
Expand the bounding box of a spatiotemporal sequence with an additional instant.
Definition: tgeo_boxops.c:283
void tspatialinst_set_stbox(const TInstant *inst, STBox *box)
Return in the last argument the spatiotemporal box of a temporal spatial instant.
Definition: tgeo_boxops.c:109
void tgeoinst_set_stbox(const TInstant *inst, STBox *box)
Bounding box operators for spatiotemporal values.
Definition: tgeo_boxops.c:90
void tspatialseqarr_set_stbox(const TSequence **sequences, int count, STBox *box)
Return in the last argument the spatiotemporal box of an array of temporal geo sequences.
Definition: tgeo_boxops.c:320
void tgeoinstarr_set_stbox(const TInstant **instants, int count, STBox *box)
Return in the last argument the spatiotemporal box of an array of temporal geo instants.
Definition: tgeo_boxops.c:181
void tgeoseq_expand_stbox(TSequence *seq, const TInstant *inst)
Expand the bounding box of a temporal point sequence with an instant.
Definition: tgeo_boxops.c:266
void spatialarr_set_bbox(const Datum *values, meosType basetype, int count, void *box)
Set a bounding box from an array of spatial set values.
Definition: tgeo_boxops.c:341
bool boxop_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2, bool(*func)(const STBox *, const STBox *))
Generic topological function for two spatiotemporal values.
Definition: tgeo_boxops.c:1599
bool boxop_tspatial_stbox(const Temporal *temp, const STBox *box, bool(*func)(const STBox *, const STBox *), bool invert)
Generic bounding box function for a spatiotemporal value and a spatiotemporal box.
Definition: tgeo_boxops.c:1587
void tspatialinstarr_set_stbox(const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, void *box)
Set a bounding box from an array of spatiotemporal instant values.
Definition: tgeo_boxops.c:222
meosType
Enumeration that defines the built-in and temporal types used in MobilityDB.
Definition: meos_catalog.h:55
interpType
Enumeration that defines the interpolation types used in MEOS.
Definition: meos.h:161
External API of the Mobility Engine Open Source (MEOS) library.
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
Structure to represent temporal values of instant subtype.
Definition: meos.h:185
Structure to represent temporal values of sequence subtype.
Definition: meos.h:202
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173