PostGIS  2.5.7dev-r@@SVN_REVISION@@
lwgeom_box3d.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * PostGIS - Spatial Types for PostgreSQL
4  * http://postgis.net
5  *
6  * PostGIS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * PostGIS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18  *
19  **********************************************************************
20  *
21  * Copyright 2009 Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
22  * Copyright 2009-2017 Paul Ramsey <pramsey@cleverelephant.ca>
23  * Copyright 2018 Darafei Praliaskouski <me@komzpa.net>
24  *
25  **********************************************************************/
26 
27 /* forward defs */
28 Datum BOX3D_in(PG_FUNCTION_ARGS);
29 Datum BOX3D_out(PG_FUNCTION_ARGS);
30 Datum LWGEOM_to_BOX3D(PG_FUNCTION_ARGS);
31 Datum BOX3D_to_LWGEOM(PG_FUNCTION_ARGS);
32 Datum BOX3D_expand(PG_FUNCTION_ARGS);
33 Datum BOX3D_to_BOX2D(PG_FUNCTION_ARGS);
34 Datum BOX3D_to_BOX(PG_FUNCTION_ARGS);
35 Datum BOX3D_xmin(PG_FUNCTION_ARGS);
36 Datum BOX3D_ymin(PG_FUNCTION_ARGS);
37 Datum BOX3D_zmin(PG_FUNCTION_ARGS);
38 Datum BOX3D_xmax(PG_FUNCTION_ARGS);
39 Datum BOX3D_ymax(PG_FUNCTION_ARGS);
40 Datum BOX3D_zmax(PG_FUNCTION_ARGS);
41 Datum BOX3D_combine(PG_FUNCTION_ARGS);
42 Datum BOX3D_combine_BOX3D(PG_FUNCTION_ARGS);
43 
44 /*****************************************************************************
45  * BOX3D operators
46  *****************************************************************************/
47 
48 bool BOX3D_contains_internal(BOX3D *box1, BOX3D *box2);
50 bool BOX3D_overlaps_internal(BOX3D *box1, BOX3D *box2);
51 bool BOX3D_same_internal(BOX3D *box1, BOX3D *box2);
52 bool BOX3D_left_internal(BOX3D *box1, BOX3D *box2);
53 bool BOX3D_overleft_internal(BOX3D *box1, BOX3D *box2);
54 bool BOX3D_right_internal(BOX3D *box1, BOX3D *box2);
56 bool BOX3D_below_internal(BOX3D *box1, BOX3D *box2);
58 bool BOX3D_above_internal(BOX3D *box1, BOX3D *box2);
60 bool BOX3D_front_internal(BOX3D *box1, BOX3D *box2);
62 bool BOX3D_back_internal(BOX3D *box1, BOX3D *box2);
63 bool BOX3D_overback_internal(BOX3D *box1, BOX3D *box2);
64 double BOX3D_distance_internal(BOX3D *box1, BOX3D *box2);
65 
67 #if POSTGIS_PGSQL_VERSION > 100
68 Datum BOX3D_contains(PG_FUNCTION_ARGS);
69 Datum BOX3D_contained(PG_FUNCTION_ARGS);
70 Datum BOX3D_overlaps(PG_FUNCTION_ARGS);
71 Datum BOX3D_same(PG_FUNCTION_ARGS);
72 Datum BOX3D_left(PG_FUNCTION_ARGS);
73 Datum BOX3D_overleft(PG_FUNCTION_ARGS);
74 Datum BOX3D_right(PG_FUNCTION_ARGS);
75 Datum BOX3D_overright(PG_FUNCTION_ARGS);
76 Datum BOX3D_below(PG_FUNCTION_ARGS);
77 Datum BOX3D_overbelow(PG_FUNCTION_ARGS);
78 Datum BOX3D_above(PG_FUNCTION_ARGS);
79 Datum BOX3D_overabove(PG_FUNCTION_ARGS);
80 Datum BOX3D_front(PG_FUNCTION_ARGS);
81 Datum BOX3D_overfront(PG_FUNCTION_ARGS);
82 Datum BOX3D_back(PG_FUNCTION_ARGS);
83 Datum BOX3D_overback(PG_FUNCTION_ARGS);
84 Datum BOX3D_distance(PG_FUNCTION_ARGS);
85 #endif
bool BOX3D_above_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_back_internal(BOX3D *box1, BOX3D *box2)
Datum BOX3D_to_BOX(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:173
Datum BOX3D_to_LWGEOM(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:183
Datum BOX3D_ymax(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:437
Datum BOX3D_zmax(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:444
Datum BOX3D_xmax(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:430
Datum BOX3D_combine(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:456
Datum BOX3D_zmin(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:423
double BOX3D_distance_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_overlaps_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_contains_internal(BOX3D *box1, BOX3D *box2)
Datum BOX3D_to_BOX2D(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:152
bool BOX3D_overabove_internal(BOX3D *box1, BOX3D *box2)
Datum BOX3D_out(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:121
bool BOX3D_right_internal(BOX3D *box1, BOX3D *box2)
Datum BOX3D_in(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:56
bool BOX3D_overback_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_overleft_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_below_internal(BOX3D *box1, BOX3D *box2)
Datum BOX3D_expand(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:359
bool BOX3D_left_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_overright_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_same_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_contained_internal(BOX3D *box1, BOX3D *box2)
Datum LWGEOM_to_BOX3D(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:390
Datum BOX3D_xmin(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:409
bool BOX3D_front_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_overfront_internal(BOX3D *box1, BOX3D *box2)
bool BOX3D_overbelow_internal(BOX3D *box1, BOX3D *box2)
Datum BOX3D_combine_BOX3D(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:523
Datum BOX3D_ymin(PG_FUNCTION_ARGS)
Definition: lwgeom_box3d.c:416