MobilityDB  1.0
geography_funcs.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 __GEOGRAPHY_FUNCTIONS_H__
33 #define __GEOGRAPHY_FUNCTIONS_H__
34 
35 #include <postgres.h>
36 #include <fmgr.h>
37 
38 #include <liblwgeom.h>
39 #if POSTGIS_VERSION_NUMBER < 30000
40 #include "postgis.h"
41 #else
42 #include <lwgeodetic_tree.h>
43 #endif
44 
45 /*****************************************************************************/
46 
47 #if POSTGIS_VERSION_NUMBER < 30000
48 extern double circ_tree_distance_tree_internal(const CIRC_NODE* n1,
49  const CIRC_NODE* n2, double threshold, double* min_dist, double* max_dist,
50  GEOGRAPHIC_POINT* closest1, GEOGRAPHIC_POINT* closest2);
51 #endif
52 
53 extern Datum geography_shortestline(PG_FUNCTION_ARGS);
54 
55 /*****************************************************************************/
56 
57 #endif
Datum geography_shortestline(PG_FUNCTION_ARGS)
Definition: geography_functions.c:449
Definition: postgis.h:169
Point in spherical coordinates on the world.
Definition: postgis.h:61
PostGIS definitions that are needed in MobilityDB but are not exported in PostGIS headers...
double circ_tree_distance_tree_internal(const CIRC_NODE *n1, const CIRC_NODE *n2, double threshold, double *min_dist, double *max_dist, GEOGRAPHIC_POINT *closest1, GEOGRAPHIC_POINT *closest2)
Definition: geography_functions.c:151