MobilityDB  1.0
tpoint_spatialrels.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * This MobilityDB code is provided under The PostgreSQL License.
4  *
5  * Copyright (c) 2016-2021, Université libre de Bruxelles and MobilityDB
6  * contributors
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation for any purpose, without fee, and without a written
10  * agreement is hereby granted, provided that the above copyright notice and
11  * this paragraph and the following two paragraphs appear in all copies.
12  *
13  * IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR
14  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
15  * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
16  * EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY
17  * OF SUCH DAMAGE.
18  *
19  * UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES,
20  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON
22  * AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO
23  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 
24  *
25  *****************************************************************************/
26 
32 #ifndef __TPOINT_SPATIALRELS_H__
33 #define __TPOINT_SPATIALRELS_H__
34 
35 #include <postgres.h>
36 #include <fmgr.h>
37 #include <catalog/pg_type.h>
38 #include "general/lifting.h"
39 
40 /*****************************************************************************/
41 
42 extern Datum spatialrel(Datum value1, Datum value2, Datum param,
43  LiftedFunctionInfo lfinfo);
44 extern datum_func3 get_dwithin_fn(int16 flags1, int16 flags2);
45 
46 extern Datum geom_contains(Datum geom1, Datum geom2);
47 extern Datum geom_containsproperly(Datum geom1, Datum geom2);
48 extern Datum geom_covers(Datum geom1, Datum geom2);
49 extern Datum geom_coveredby(Datum geom1, Datum geom2);
50 extern Datum geom_crosses(Datum geom1, Datum geom2);
51 extern Datum geom_disjoint(Datum geom1, Datum geom2);
52 extern Datum geom_equals(Datum geom1, Datum geom2);
53 extern Datum geom_intersects2d(Datum geom1, Datum geom2);
54 extern Datum geom_intersects3d(Datum geom1, Datum geom2);
55 extern Datum geom_overlaps(Datum geom1, Datum geom2);
56 extern Datum geom_touches(Datum geom1, Datum geom2);
57 extern Datum geom_within(Datum geom1, Datum geom2);
58 extern Datum geom_dwithin2d(Datum geom1, Datum geom2, Datum dist);
59 extern Datum geom_dwithin3d(Datum geom1, Datum geom2, Datum dist);
60 extern Datum geom_relate(Datum geom1, Datum geom2);
61 extern Datum geom_relate_pattern(Datum geom1, Datum geom2, Datum pattern);
62 
63 extern Datum geog_covers(Datum geog1, Datum geog2);
64 extern Datum geog_coveredby(Datum geog1, Datum geog2);
65 extern Datum geog_intersects(Datum geog1, Datum geog2);
66 extern Datum geog_dwithin(Datum geog1, Datum geog2, Datum dist);
67 
68 /*****************************************************************************/
69 
70 extern Datum contains_geo_tpoint(PG_FUNCTION_ARGS);
71 
72 extern Datum disjoint_geo_tpoint(PG_FUNCTION_ARGS);
73 extern Datum disjoint_tpoint_geo(PG_FUNCTION_ARGS);
74 
75 extern Datum intersects_geo_tpoint(PG_FUNCTION_ARGS);
76 extern Datum intersects_tpoint_geo(PG_FUNCTION_ARGS);
77 
78 extern Datum touches_geo_tpoint(PG_FUNCTION_ARGS);
79 extern Datum touches_tpoint_geo(PG_FUNCTION_ARGS);
80 
81 extern Datum dwithin_geo_tpoint(PG_FUNCTION_ARGS);
82 extern Datum dwithin_tpoint_geo(PG_FUNCTION_ARGS);
83 extern Datum dwithin_tpoint_tpoint(PG_FUNCTION_ARGS);
84 
85 /*****************************************************************************/
86 
87 #endif
Datum geom_crosses(Datum geom1, Datum geom2)
Datum dwithin_tpoint_tpoint(PG_FUNCTION_ARGS)
Returns true if the trajectories of the temporal points are within the given distance.
Definition: tpoint_spatialrels.c:488
Datum dwithin_tpoint_geo(PG_FUNCTION_ARGS)
Returns true if the trajectory of the temporal point and the geometry are within the given distance...
Definition: tpoint_spatialrels.c:474
Datum geom_intersects3d(Datum geom1, Datum geom2)
Calls the PostGIS function ST_3DIntersects with the 2 arguments.
Definition: tpoint_spatialrels.c:102
Datum geom_touches(Datum geom1, Datum geom2)
Calls the PostGIS function ST_Touches with the 2 arguments.
Definition: tpoint_spatialrels.c:115
Datum geom_coveredby(Datum geom1, Datum geom2)
Datum geom_intersects2d(Datum geom1, Datum geom2)
Calls the PostGIS function ST_Intersects with the 2 arguments.
Definition: tpoint_spatialrels.c:89
Datum geom_disjoint(Datum geom1, Datum geom2)
Calls the PostGIS function ST_Disjoint with the 2 arguments.
Definition: tpoint_spatialrels.c:80
Datum geog_intersects(Datum geog1, Datum geog2)
Calls the PostGIS function ST_Intersects for geographies with the 2 arguments.
Definition: tpoint_spatialrels.c:160
Datum geom_overlaps(Datum geom1, Datum geom2)
datum_func3 get_dwithin_fn(int16 flags1, int16 flags2)
Select the appropriate dwithin function.
Definition: tpoint_spatialrels.c:124
Datum geog_coveredby(Datum geog1, Datum geog2)
Datum geom_containsproperly(Datum geom1, Datum geom2)
Datum touches_tpoint_geo(PG_FUNCTION_ARGS)
Returns true if the trajectory of the temporal point touches the geometry.
Definition: tpoint_spatialrels.c:445
Datum dwithin_geo_tpoint(PG_FUNCTION_ARGS)
Returns true if the geometry and the trajectory of the temporal point are within the given distance...
Definition: tpoint_spatialrels.c:460
Datum disjoint_tpoint_geo(PG_FUNCTION_ARGS)
Returns true if the trajectory of the temporal point and the geometry are disjoint.
Definition: tpoint_spatialrels.c:389
Datum geom_relate(Datum geom1, Datum geom2)
Datum geom_equals(Datum geom1, Datum geom2)
Datum intersects_tpoint_geo(PG_FUNCTION_ARGS)
Returns true if the trajectory of the temporal point and the geometry intersect.
Definition: tpoint_spatialrels.c:418
Datum touches_geo_tpoint(PG_FUNCTION_ARGS)
Returns true if the geometry touches the trajectory of the temporal point.
Definition: tpoint_spatialrels.c:435
Datum spatialrel(Datum value1, Datum value2, Datum param, LiftedFunctionInfo lfinfo)
Datum geom_dwithin3d(Datum geom1, Datum geom2, Datum dist)
Calls the PostGIS function ST_3DDWithin with the 4 arguments.
Definition: tpoint_spatialrels.c:149
Datum geom_contains(Datum geom1, Datum geom2)
Calls the PostGIS function ST_Contains with the 2 arguments.
Definition: tpoint_spatialrels.c:71
Datum geom_relate_pattern(Datum geom1, Datum geom2, Datum pattern)
Datum geom_covers(Datum geom1, Datum geom2)
Datum disjoint_geo_tpoint(PG_FUNCTION_ARGS)
Returns true if the geometry and the trajectory of the temporal point are disjoint.
Definition: tpoint_spatialrels.c:378
Datum geog_covers(Datum geog1, Datum geog2)
Definition: lifting.h:55
Datum intersects_geo_tpoint(PG_FUNCTION_ARGS)
Returns true if the geometry and the trajectory of the temporal point intersect.
Definition: tpoint_spatialrels.c:404
Datum contains_geo_tpoint(PG_FUNCTION_ARGS)
Returns true if the geometry contains the trajectory of the temporal point.
Definition: tpoint_spatialrels.c:363
Datum geom_dwithin2d(Datum geom1, Datum geom2, Datum dist)
Calls the PostGIS function ST_DWithin with the 3 arguments.
Definition: tpoint_spatialrels.c:140
Datum geog_dwithin(Datum geog1, Datum geog2, Datum dist)
Calls the PostGIS function ST_DWithin for geographies with the 2 arguments.
Definition: tpoint_spatialrels.c:172
Datum geom_within(Datum geom1, Datum geom2)
Datum(* datum_func3)(Datum, Datum, Datum)
Definition: temporal.h:359