MobilityDB  1.0
tpoint_analytics.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_ANALYTICS_H__
33 #define __TPOINT_ANALYTICS_H__
34 
35 #include <postgres.h>
36 #include <fmgr.h>
37 
38 #include "general/temporaltypes.h"
39 
40 /*****************************************************************************/
41 
42 /* Convert a temporal point into a PostGIS trajectory geometry/geography */
43 
44 extern Datum tpoint_to_geo(PG_FUNCTION_ARGS);
45 extern Datum geo_to_tpoint(PG_FUNCTION_ARGS);
46 
47 /* Convert a temporal point and a temporal float into a PostGIS geometry/geography */
48 
49 extern Datum point_to_geo_measure(PG_FUNCTION_ARGS);
50 
51 /* Simple Douglas-Peucker-like value simplification for temporal floats and
52  * temporal points. */
53 
54 extern Datum tfloat_simplify(PG_FUNCTION_ARGS);
55 extern Datum tpoint_simplify(PG_FUNCTION_ARGS);
56 
57 extern Temporal *tpoint_simplify_internal(Temporal *temp, double eps_dist,
58  double eps_speed);
59 
60 /* Transform the temporal point to Mapbox Vector Tile format */
61 
62 extern Datum AsMVT(PG_FUNCTION_ARGS);
63 
64 /*****************************************************************************/
65 
66 #endif
Datum point_to_geo_measure(PG_FUNCTION_ARGS)
General functions for temporal types.
Datum tpoint_to_geo(PG_FUNCTION_ARGS)
Converts the temporal point into a PostGIS trajectory geometry/geography where the M coordinates enco...
Definition: tpoint_analytics.c:384
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: temporal.h:241
Datum geo_to_tpoint(PG_FUNCTION_ARGS)
Converts the PostGIS trajectory geometry/geography where the M coordinates encode the timestamps in U...
Definition: tpoint_analytics.c:610
Datum tpoint_simplify(PG_FUNCTION_ARGS)
Simplifies the temporal sequence (set) point using a spatio-temporal extension of the Douglas-Peucker...
Definition: tpoint_analytics.c:1631
Temporal * tpoint_simplify_internal(Temporal *temp, double eps_dist, double eps_speed)
Definition: tpoint_analytics.c:1608
Datum tfloat_simplify(PG_FUNCTION_ARGS)
Simplifies the temporal number using a Douglas-Peucker-like line simplification algorithm.
Definition: tpoint_analytics.c:1189
Datum AsMVT(PG_FUNCTION_ARGS)