MobilityDB 1.3
Loading...
Searching...
No Matches
tspatial.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 __PG_TSPATIAL_H__
35#define __PG_TSPATIAL_H__
36
37/* PostgreSQL */
38#include <postgres.h>
39#include <utils/array.h>
40#include <fmgr.h>
41
42/*****************************************************************************/
43
44/* Fetch from and store in the cache the fcinfo of the external function */
45extern FunctionCallInfo fetch_fcinfo(void);
46extern void store_fcinfo(FunctionCallInfo fcinfo);
47
48extern Temporal *tspatial_valid_typmod(Temporal *temp, int32_t typmod);
49extern uint32 tspatial_typmod_in(ArrayType *arr, int is_point, int is_geodetic);
50extern Datum Spatialarr_as_text_ext(FunctionCallInfo fcinfo, bool extended);
51
52extern Datum EAcomp_tspatial_geo(FunctionCallInfo fcinfo,
53 int (*func)(const Temporal *, const GSERIALIZED *));
54extern Datum EAcomp_geo_tspatial(FunctionCallInfo fcinfo,
55 int (*func)(const GSERIALIZED *, const Temporal *));
56
57extern Datum Tcomp_geo_tspatial(FunctionCallInfo fcinfo,
58 Temporal * (*func)(const GSERIALIZED *, const Temporal *));
59extern Datum Tcomp_tspatial_geo(FunctionCallInfo fcinfo,
60 Temporal * (*func)(const Temporal *, const GSERIALIZED *));
61
62extern Datum EA_spatialrel_geo_tspatial(FunctionCallInfo fcinfo,
63 int (*func)(const GSERIALIZED *, const Temporal *, bool), bool ever);
64extern Datum EA_spatialrel_tspatial_geo(FunctionCallInfo fcinfo,
65 int (*func)(const Temporal *, const GSERIALIZED *, bool), bool ever);
66extern Datum EA_spatialrel_tspatial_tspatial(FunctionCallInfo fcinfo,
67 int (*func)(const Temporal *, const Temporal *, bool), bool ever);
68
69extern Datum Tspatialrel_geo_tspatial(FunctionCallInfo fcinfo,
70 Temporal * (*func)(const GSERIALIZED *, const Temporal *, bool, bool));
71extern Datum Tspatialrel_tspatial_geo(FunctionCallInfo fcinfo,
72 Temporal * (*func)(const Temporal *, const GSERIALIZED *, bool, bool));
73extern Datum Tspatialrel_tspatial_tspatial(FunctionCallInfo fcinfo,
74 Temporal * (*func)(const Temporal *, const Temporal *, bool, bool));
75
76extern Datum EA_dwithin_tspatial_geo(FunctionCallInfo fcinfo,
77 int (*func)(const Temporal *, const GSERIALIZED *, double dist, bool),
78 bool ever);
79extern Datum EA_dwithin_geo_tspatial(FunctionCallInfo fcinfo,
80 int (*func)(const Temporal *, const GSERIALIZED *, double dist, bool),
81 bool ever);
82
83extern Datum Tdwithin_geo_tspatial(FunctionCallInfo fcinfo,
84 Temporal * (*func)(const GSERIALIZED *, const Temporal *, double, bool, bool));
85extern Datum Tdwithin_tspatial_geo(FunctionCallInfo fcinfo,
86 Temporal * (*func)(const Temporal *, const GSERIALIZED *, double, bool, bool));
87extern Datum Tdwithin_tspatial_tspatial(FunctionCallInfo fcinfo,
88 Temporal * (*func)(const Temporal *, const Temporal *, double, bool, bool));
89
90/*****************************************************************************/
91
92#endif /* __PG_TSPATIAL_H__ */
FunctionCallInfo fetch_fcinfo(void)
Spatial functions for temporal points.
Definition: temporal.c:104
Datum EA_dwithin_tspatial_geo(FunctionCallInfo fcinfo, int(*func)(const Temporal *, const GSERIALIZED *, double dist, bool), bool ever)
Return true if a spatiotemporal value and a geometry are ever/always within a distance.
Definition: tgeo_spatialrels.c:149
Datum Tspatialrel_tspatial_geo(FunctionCallInfo fcinfo, Temporal *(*func)(const Temporal *, const GSERIALIZED *, bool, bool))
Return a temporal boolean that states whether a spatial temporal value and a geometry satisfy a spati...
Definition: tspatial_tempspatialrels.c:92
Datum EA_spatialrel_tspatial_geo(FunctionCallInfo fcinfo, int(*func)(const Temporal *, const GSERIALIZED *, bool), bool ever)
Return true if a spatiotemporal value and a geometry ever/always satisfy a spatial relationship.
Definition: tgeo_spatialrels.c:88
Datum Tcomp_geo_tspatial(FunctionCallInfo fcinfo, Temporal *(*func)(const GSERIALIZED *, const Temporal *))
Generic function for the temporal comparison operators.
Definition: tgeo_compops.c:281
Datum Tdwithin_geo_tspatial(FunctionCallInfo fcinfo, Temporal *(*func)(const GSERIALIZED *, const Temporal *, double, bool, bool))
Return a temporal boolean that states whether a geometry and a spatiotemporal value are within a give...
Definition: tspatial_tempspatialrels.c:149
Datum EA_spatialrel_geo_tspatial(FunctionCallInfo fcinfo, int(*func)(const GSERIALIZED *, const Temporal *, bool), bool ever)
Return true if a geometry and a spatiotemporal value ever/always satisfy a spatial relationship.
Definition: tgeo_spatialrels.c:70
Datum Tspatialrel_tspatial_tspatial(FunctionCallInfo fcinfo, Temporal *(*func)(const Temporal *, const Temporal *, bool, bool))
Return a temporal boolean that states whether two spatial temporal values satisfy a spatial relations...
Definition: tspatial_tempspatialrels.c:119
Datum EAcomp_tspatial_geo(FunctionCallInfo fcinfo, int(*func)(const Temporal *, const GSERIALIZED *))
Generic function for the temporal ever/always comparison operators.
Definition: tgeo_compops.c:80
void store_fcinfo(FunctionCallInfo fcinfo)
Store in the cache the fcinfo of the external function.
Definition: temporal.c:114
Datum EA_spatialrel_tspatial_tspatial(FunctionCallInfo fcinfo, int(*func)(const Temporal *, const Temporal *, bool), bool ever)
Return true if two spatiotemporal values ever/always satisfy the spatial relationship.
Definition: tgeo_spatialrels.c:109
Datum EA_dwithin_geo_tspatial(FunctionCallInfo fcinfo, int(*func)(const Temporal *, const GSERIALIZED *, double dist, bool), bool ever)
Return true if a geometry and a spatiotemporal value are ever/always within a distance.
Definition: tgeo_spatialrels.c:129
Datum Tdwithin_tspatial_tspatial(FunctionCallInfo fcinfo, Temporal *(*func)(const Temporal *, const Temporal *, double, bool, bool))
Return a temporal boolean that states whether two spatiotemporal values are within a given distance.
Definition: tspatial_tempspatialrels.c:205
Datum EAcomp_geo_tspatial(FunctionCallInfo fcinfo, int(*func)(const GSERIALIZED *, const Temporal *))
Generic function for the temporal ever/always comparison operators.
Definition: tgeo_compops.c:61
uint32 tspatial_typmod_in(ArrayType *arr, int is_point, int is_geodetic)
Input typmod information for temporal geos.
Definition: tgeo.c:152
Temporal * tspatial_valid_typmod(Temporal *temp, int32_t typmod)
Check the consistency of the metadata specified in the typmod: temporal subtype, geometry type,...
Definition: tgeo.c:408
Datum Tspatialrel_geo_tspatial(FunctionCallInfo fcinfo, Temporal *(*func)(const GSERIALIZED *, const Temporal *, bool, bool))
Return a temporal boolean that states whether a geometry and a spatiotemporal value satisfy a spatial...
Definition: tspatial_tempspatialrels.c:65
Datum Tdwithin_tspatial_geo(FunctionCallInfo fcinfo, Temporal *(*func)(const Temporal *, const GSERIALIZED *, double, bool, bool))
Return a temporal boolean that states whether a spatiotemporal value and a geometry are within a give...
Definition: tspatial_tempspatialrels.c:177
Datum Tcomp_tspatial_geo(FunctionCallInfo fcinfo, Temporal *(*func)(const Temporal *, const GSERIALIZED *))
Generic function for the temporal comparison operators.
Definition: tgeo_compops.c:301
Datum Spatialarr_as_text_ext(FunctionCallInfo fcinfo, bool extended)
Return the (Extended) Well-Known Text (WKT or EWKT) representation of an array of spatial values (ext...
Definition: spatialset.c:144
unsigned int uint32
Definition: postgres_ext_defs.in.h:16
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
Definition: postgis_ext_defs.in.h:170
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
int const GSERIALIZED bool ever
Definition: trgeo_spatialrels.h:53