MobilityDB 1.3
Loading...
Searching...
No Matches
tspatial_parser.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 __TSPATIAL_PARSER_H__
35#define __TSPATIAL_PARSER_H__
36
37/* PostgreSQL */
38#include <postgres.h>
39/* MEOS */
40#include <meos.h>
41#include <meos_geo.h>
42#include "temporal/meos_catalog.h"
43
44/*****************************************************************************/
45
46extern bool srid_parse(const char **str, int *srid);
47extern bool spatial_parse_elem(const char **str, meosType temptype, char delim,
48 int *temp_srid, Datum *result);
49extern bool geo_parse(const char **str, meosType basetype, char delim,
50 int *srid, GSERIALIZED **result);
51extern STBox *stbox_parse(const char **str);
52extern Temporal *tpoint_parse(const char **str, meosType temptype);
53
54extern bool tspatialinst_parse(const char **str, meosType temptype, bool end,
55 int *temp_srid, TInstant **result);
56extern TSequence *tspatialseq_disc_parse(const char **str, meosType temptype,
57 int *temp_srid);
58extern bool tspatialseq_cont_parse(const char **str, meosType temptype,
59 interpType interp, bool end, int *temp_srid, TSequence **result);
60extern TSequenceSet *tspatialseqset_parse(const char **str, meosType temptype,
61 interpType interp, int *temp_srid);
62extern Temporal *tspatial_parse(const char **str, meosType temptype);
63
64/*****************************************************************************/
65
66#endif /* __TSPATIAL_PARSER_H__ */
meosType
Enumeration that defines the built-in and temporal types used in MobilityDB.
Definition: meos_catalog.h:55
interpType
Enumeration that defines the interpolation types used in MEOS.
Definition: meos.h:161
External API of the Mobility Engine Open Source (MEOS) library.
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
Definition: postgis_ext_defs.in.h:170
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
Structure to represent temporal values of instant subtype.
Definition: meos.h:185
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:224
Structure to represent temporal values of sequence subtype.
Definition: meos.h:202
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
bool tspatialinst_parse(const char **str, meosType temptype, bool end, int *temp_srid, TInstant **result)
Parse a spatiotemporal instant from the input buffer.
Definition: tspatial_parser.c:374
STBox * stbox_parse(const char **str)
Parse a spatiotemporal box from the buffer.
Definition: tspatial_parser.c:89
Temporal * tspatial_parse(const char **str, meosType temptype)
Parse a spatiotemporal value from the input buffer.
Definition: tspatial_parser.c:557
bool srid_parse(const char **str, int *srid)
Functions for parsing temporal points.
Definition: tspatial_parser.c:54
TSequence * tspatialseq_disc_parse(const char **str, meosType temptype, int *temp_srid)
Parse a temporal discrete sequence spatial value from the buffer.
Definition: tspatial_parser.c:405
TSequenceSet * tspatialseqset_parse(const char **str, meosType temptype, interpType interp, int *temp_srid)
Parse a temporal sequence set spatial value from the input buffer.
Definition: tspatial_parser.c:515
Temporal * tpoint_parse(const char **str, meosType temptype)
Parse a temporal point value from the buffer.
Definition: tspatial_parser.c:627
bool geo_parse(const char **str, meosType basetype, char delim, int *srid, GSERIALIZED **result)
bool tspatialseq_cont_parse(const char **str, meosType temptype, interpType interp, bool end, int *temp_srid, TSequence **result)
Parse a temporal sequence spatial value from the input buffer.
Definition: tspatial_parser.c:451
bool spatial_parse_elem(const char **str, meosType temptype, char delim, int *temp_srid, Datum *result)
Parse a spatial base value from the input buffer.
Definition: tspatial_parser.c:326