MobilityDB 1.3
Loading...
Searching...
No Matches
tgeo_spatialfuncs.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 __TGEO_SPATIALFUNCS_H__
35#define __TGEO_SPATIALFUNCS_H__
36
37/* PostgreSQL */
38#include <postgres.h>
39/* PostGIS */
40#include <liblwgeom.h>
41/* MEOS */
42#include <meos.h>
43#include "temporal/temporal.h"
44
46#define TGEOMP_TO_TGEOGP true
47#define TGEOGP_TO_TGEOMP false
48
50#define TGEOM_TO_TGEOG true
51#define TGEOG_TO_TGEOM false
52
54#define TGEO_TO_TPOINT true
55#define TPOINT_TO_TGEO false
56
57/*****************************************************************************/
58
59/* Utility functions */
60
61extern void datum_point4d(Datum value, POINT4D *p);
62extern int geopoint_cmp(const GSERIALIZED *gs1, const GSERIALIZED *gs2);
63extern bool geopoint_eq(const GSERIALIZED *gs1, const GSERIALIZED *gs2);
64extern bool geopoint_same(const GSERIALIZED *gs1, const GSERIALIZED *gs2);
65extern bool datum_point_eq(Datum point1, Datum point2);
66extern bool datum_point_same(Datum point1, Datum point2);
67extern Datum datum2_point_eq(Datum point1, Datum point2);
68extern Datum datum2_point_ne(Datum point1, Datum point2);
69extern Datum datum2_point_same(Datum point1, Datum point2);
70extern Datum datum2_point_nsame(Datum point1, Datum point2);
73extern GSERIALIZED **geo_extract_elements(const GSERIALIZED *gs, int *count);
74extern GSERIALIZED *geo_serialize(const LWGEOM *geom);
75
76/* Generic functions */
77
79extern datum_func2 pt_distance_fn(int16 flags);
80extern Datum datum_geom_distance2d(Datum geom1, Datum geom2);
81extern Datum datum_geom_distance3d(Datum geom1, Datum geom2);
82extern Datum datum_geog_distance(Datum geog1, Datum geog2);
83extern Datum datum_pt_distance2d(Datum geom1, Datum geom2);
84extern Datum datum_pt_distance3d(Datum geom1, Datum geom2);
85extern int16 spatial_flags(Datum d, meosType basetype);
86
87/* Validity functions */
88
89extern bool ensure_srid_is_latlong(int32_t srid);
90extern bool ensure_spatial_validity(const Temporal *temp1,
91 const Temporal *temp2);
92extern int spheroid_init_from_srid(int32_t srid, SPHEROID *s);
93extern bool ensure_not_geodetic(int16 flags);
94extern bool ensure_same_geodetic(int16 flags1, int16 flags2);
95extern bool ensure_same_geodetic_geo(const GSERIALIZED *gs1,
96 const GSERIALIZED *gs2);
97extern bool ensure_same_geodetic_tspatial_geo(const Temporal *temp,
98 const GSERIALIZED *gs);
99extern bool ensure_same_geodetic_tspatial_base(const Temporal *temp,
100 Datum base);
101extern bool ensure_srid_known(int32_t srid);
102extern bool ensure_same_srid(int32_t srid1, int32_t srid2);
103extern bool ensure_same_dimensionality(int16 flags1, int16 flags2);
104extern bool same_spatial_dimensionality(int16 flags1, int16 flags2);
105extern bool ensure_same_spatial_dimensionality(int16 flags1, int16 flags2);
106extern bool ensure_same_dimensionality_geo(const GSERIALIZED *gs1,
107 const GSERIALIZED *gs2);
108extern bool same_dimensionality_tspatial_geo(const Temporal *temp,
109 const GSERIALIZED *gs);
111 const GSERIALIZED *gs);
113 const GSERIALIZED *gs);
114extern bool ensure_same_geodetic_stbox_geo(const STBox *box,
115 const GSERIALIZED *gs);
116extern bool ensure_has_Z_geo(const GSERIALIZED *gs);
117extern bool ensure_has_not_Z_geo(const GSERIALIZED *gs);
118extern bool ensure_has_M_geo(const GSERIALIZED *gs);
119extern bool ensure_has_not_M_geo(const GSERIALIZED *gs);
120extern bool ensure_not_geodetic_geo(const GSERIALIZED *gs);
121extern bool ensure_point_type(const GSERIALIZED *gs);
122extern bool ensure_mline_type(const GSERIALIZED *gs);
123extern bool circle_type(const GSERIALIZED *gs);
124extern bool ensure_circle_type(const GSERIALIZED *gs);
125extern bool ensure_not_empty(const GSERIALIZED *gs);
126extern bool ensure_valid_stbox_geo(const STBox *box, const GSERIALIZED *gs);
127extern bool ensure_valid_tspatial_geo(const Temporal *temp,
128 const GSERIALIZED *gs);
129extern bool ensure_valid_tspatial_base(const Temporal *temp, Datum base);
130extern bool ensure_valid_tspatial_tspatial(const Temporal *temp1,
131 const Temporal *temp2);
132extern bool ensure_valid_spatial_stbox_stbox(const STBox *box1,
133 const STBox *box2);
134extern bool ensure_valid_tgeo_stbox(const Temporal *temp, const STBox *box);
135extern bool ensure_valid_geo_geo(const GSERIALIZED *gs1,
136 const GSERIALIZED *gs2);
137extern bool ensure_valid_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs);
138extern bool ensure_valid_tgeo_tgeo(const Temporal *temp1,
139 const Temporal *temp2);
140extern bool ensure_valid_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
141extern bool ensure_valid_tpoint_tpoint(const Temporal *temp1,
142 const Temporal *temp2);
143
144extern bool mline_type(const GSERIALIZED *gs);
145
146/* Functions for extracting coordinates */
147
148extern Temporal *tpoint_get_coord(const Temporal *temp, int coord);
149
150/* Ever/always comparisons */
151
152extern int eacomp_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs,
153 Datum (*func)(Datum, Datum, meosType), bool ever);
154
155/* Functions derived from PostGIS to increase floating-point precision */
156
157extern long double closest_point2d_on_segment_ratio(const POINT2D *p,
158 const POINT2D *A, const POINT2D *B, POINT2D *closest);
159extern long double closest_point3dz_on_segment_ratio(const POINT3DZ *p,
160 const POINT3DZ *A, const POINT3DZ *B, POINT3DZ *closest);
161extern long double closest_point_on_segment_sphere(const POINT4D *p,
162 const POINT4D *A, const POINT4D *B, POINT4D *closest, double *dist);
163extern void interpolate_point4d_spheroid(const POINT4D *p1, const POINT4D *p2,
164 POINT4D *p, const SPHEROID *s, double f);
165
166/* Functions specializing the PostGIS functions ST_LineInterpolatePoint and
167 * ST_LineLocatePoint */
168
169extern GSERIALIZED *geopoint_make(double x, double y, double z, bool hasz,
170 bool geodetic, int32_t srid);
171extern LWGEOM *lwcircle_make(double x, double y, double radius, int32_t srid);
172extern GSERIALIZED *geocircle_make(double x, double y, double radius,
173 int32_t srid);
174extern Datum pointsegm_interpolate(Datum start, Datum end,
175 long double ratio);
176extern long double pointsegm_locate(Datum start, Datum end, Datum point,
177 double *dist);
178
179/* Intersection functions */
180
181extern int tgeompointsegm_intersection(Datum start1, Datum end1, Datum start2,
182 Datum end2, TimestampTz lower, TimestampTz upper, TimestampTz *t1,
183 TimestampTz *t2);
184extern int tgeogpointsegm_intersection(Datum start1, Datum end1, Datum start2,
185 Datum end2, TimestampTz lower, TimestampTz upper, TimestampTz *t1,
186 TimestampTz *t2);
187
188extern bool geopoint_collinear(Datum value1, Datum value2, Datum value3,
189 double ratio, bool hasz, bool geodetic);
190
191/* Trajectory functions */
192
193extern LWGEOM **lwpointarr_remove_duplicates(LWGEOM **points, int count,
194 int *newcount);
195extern LWGEOM *lwpointarr_make_trajectory(LWGEOM **points, int count,
196 interpType interp);
197extern LWLINE *lwline_make(Datum value1, Datum value2);
198extern LWGEOM *lwcoll_from_points_lines(LWGEOM **points, LWGEOM **lines,
199 int npoints, int nlines);
200
201/* Stop function */
202
203int tpointseq_stops_iter(const TSequence *seq, double maxdist, int64 mintunits,
204 TSequence **result);
205
206/*****************************************************************************/
207
208#endif
Temporal * tpoint_get_coord(const Temporal *temp, int coord)
Return one of the coordinates of a temporal point as a temporal float.
Definition: tpoint_spatialfuncs.c:164
meosType
Enumeration that defines the built-in and temporal types used in MobilityDB.
Definition: meos_catalog.h:55
Datum(* datum_func2)(Datum, Datum)
Definition: temporal.h:296
interpType
Enumeration that defines the interpolation types used in MEOS.
Definition: meos.h:161
External API of the Mobility Engine Open Source (MEOS) library.
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
signed short int16
Definition: postgres_ext_defs.in.h:10
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
long int int64
Definition: postgres_ext_defs.in.h:12
Definition: postgis_ext_defs.in.h:170
Definition: postgis_ext_defs.in.h:184
Definition: postgis_ext_defs.in.h:208
Definition: postgis_ext_defs.in.h:116
Definition: postgis_ext_defs.in.h:122
Definition: postgis_ext_defs.in.h:140
Definition: postgis_ext_defs.in.h:101
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
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
long double closest_point_on_segment_sphere(const POINT4D *p, const POINT4D *A, const POINT4D *B, POINT4D *closest, double *dist)
Return a float between 0 and 1 representing the location of the closest point on the geography segmen...
Definition: tpoint_spatialfuncs.c:334
bool ensure_valid_tgeo_stbox(const Temporal *temp, const STBox *box)
Ensure the validity of a temporal geo and a spatiotemporal box.
Definition: tgeo_spatialfuncs.c:908
bool same_dimensionality_tspatial_geo(const Temporal *temp, const GSERIALIZED *gs)
Return true if a spatiotemporal value and a geometry/geography have thesame dimensionality.
Definition: tgeo_spatialfuncs.c:651
LWGEOM * lwcoll_from_points_lines(LWGEOM **points, LWGEOM **lines, int npoints, int nlines)
Return a geometry from an array of points and lines.
Definition: tpoint_spatialfuncs.c:748
Datum datum2_point_nsame(Datum point1, Datum point2)
Datum datum2_point_eq(Datum point1, Datum point2)
Return true if the points are equal.
Definition: tgeo_spatialfuncs.c:242
bool ensure_srid_is_latlong(int32_t srid)
Ensure that an SRID is geodetic.
Definition: tspatial_srid.c:373
bool ensure_has_M_geo(const GSERIALIZED *gs)
Ensure that the geometry/geography has M dimension.
Definition: tgeo_spatialfuncs.c:738
bool ensure_point_type(const GSERIALIZED *gs)
Ensure that the geometry/geography is a point.
Definition: tgeo_spatialfuncs.c:777
bool ensure_valid_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2)
Ensure the validity of two temporal points.
Definition: tpoint_spatialfuncs.c:111
bool ensure_srid_known(int32_t srid)
Ensure that the SRID is known.
Definition: tgeo_spatialfuncs.c:566
Datum datum_pt_distance2d(Datum geom1, Datum geom2)
Return the 2D distance between the two geometry points.
Definition: tgeo_spatialfuncs.c:360
bool ensure_spatial_validity(const Temporal *temp1, const Temporal *temp2)
Ensure that the spatial constraints required for operating on two temporal geometries are satisfied.
Definition: tgeo_spatialfuncs.c:473
bool ensure_has_not_Z_geo(const GSERIALIZED *gs)
Ensure that the geometry/geography has not Z dimension.
Definition: tgeo_spatialfuncs.c:725
bool ensure_same_geodetic_tspatial_base(const Temporal *temp, Datum base)
Ensure that the spatiotemporal argument and the geometry/geography have the same type of coordinates,...
Definition: tgeo_spatialfuncs.c:547
bool ensure_same_srid(int32_t srid1, int32_t srid2)
Ensure that the two spatial objects have the same SRID.
Definition: tgeo_spatialfuncs.c:579
GSERIALIZED ** geo_extract_elements(const GSERIALIZED *gs, int *count)
datum_func2 pt_distance_fn(int16 flags)
Select the appropriate distance function.
Definition: tgeo_spatialfuncs.c:316
bool ensure_same_geodetic_geo(const GSERIALIZED *gs1, const GSERIALIZED *gs2)
Ensure that two geometries/geographies have the same dimensionality.
Definition: tgeo_spatialfuncs.c:516
int tgeompointsegm_intersection(Datum start1, Datum end1, Datum start2, Datum end2, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
Return 1 or 2 if two temporal geometry point segments intersect during the period defined by the outp...
Definition: tpoint_spatialfuncs.c:559
bool ensure_valid_geo_geo(const GSERIALIZED *gs1, const GSERIALIZED *gs2)
Ensure the validity of two temporal points.
Definition: tpoint_spatialfuncs.c:83
Datum datum2_point_ne(Datum point1, Datum point2)
Datum datum_pt_distance3d(Datum geom1, Datum geom2)
Return the 3D distance between the two geometry points.
Definition: tgeo_spatialfuncs.c:371
int spheroid_init_from_srid(int32_t srid, SPHEROID *s)
Return 1 if the spheroid in the last argument was initialized from an SRID, return 0 otherwise.
Definition: tspatial_transform_meos.c:652
bool same_spatial_dimensionality(int16 flags1, int16 flags2)
Return true if the two temporal points have the same spatial dimensionality as given by their flags.
Definition: tgeo_spatialfuncs.c:609
LWGEOM * lwpointarr_make_trajectory(LWGEOM **points, int count, interpType interp)
Return a trajectory from a set of points.
Definition: tpoint_spatialfuncs.c:702
int geopoint_cmp(const GSERIALIZED *gs1, const GSERIALIZED *gs2)
Return -1, 0, or 1 depending on whether the first point is less than, equal to, or greater than the s...
Definition: tgeo_spatialfuncs.c:125
bool datum_point_eq(Datum point1, Datum point2)
Return true if the points are equal.
Definition: tgeo_spatialfuncs.c:183
bool ensure_has_not_M_geo(const GSERIALIZED *gs)
Ensure that the geometry/geography has not M dimension.
Definition: tgeo_spatialfuncs.c:751
long double closest_point2d_on_segment_ratio(const POINT2D *p, const POINT2D *A, const POINT2D *B, POINT2D *closest)
Return a long double between 0 and 1 representing the location of the closest point on the 2D segment...
Definition: tpoint_spatialfuncs.c:237
bool ensure_mline_type(const GSERIALIZED *gs)
Ensure that the geometry/geography is a (multi)line.
Definition: tgeo_spatialfuncs.c:802
bool ensure_same_geodetic_tspatial_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure that the spatiotemporal argument and the geometry/geography have the same type of coordinates,...
Definition: tgeo_spatialfuncs.c:530
bool ensure_not_geodetic(int16 flags)
Ensure that the spatiotemporal argument has planar coordinates.
Definition: tgeo_spatialfuncs.c:486
bool ensure_valid_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure the validity of two temporal points.
Definition: tpoint_spatialfuncs.c:98
int eacomp_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs, Datum(*func)(Datum, Datum, meosType), bool ever)
Return true if a temporal geo and a geo satisfy the ever/always comparison.
Definition: tgeo_compops.c:60
bool ensure_valid_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2)
Ensure the validity of two temporal geos.
Definition: tgeo_spatialfuncs.c:922
LWGEOM ** lwpointarr_remove_duplicates(LWGEOM **points, int count, int *newcount)
Remove duplicates from an array of LWGEOM points.
Definition: tpoint_spatialfuncs.c:677
long double pointsegm_locate(Datum start, Datum end, Datum point, double *dist)
Return a float in (0,1) representing the location of the closest point on the line segment to the giv...
Definition: tpoint_spatialfuncs.c:478
GSERIALIZED * geocircle_make(double x, double y, double radius, int32_t srid)
Return a circle created from a central point and a radius.
Definition: tcbuffer_spatialfuncs.c:123
void datum_point4d(Datum value, POINT4D *p)
Return a 4D point from a datum.
Definition: tgeo_spatialfuncs.c:82
Datum datum2_geom_centroid(Datum geo)
Return the centroid of a geometry.
Definition: tgeo_spatialfuncs.c:280
bool circle_type(const GSERIALIZED *gs)
Return true if the geometry/geography is a circle.
Definition: tcbuffer_spatialfuncs.c:54
bool ensure_valid_stbox_geo(const STBox *box, const GSERIALIZED *gs)
Ensure the validity of a spatiotemporal box and a geometry.
Definition: tgeo_spatialfuncs.c:830
void interpolate_point4d_spheroid(const POINT4D *p1, const POINT4D *p2, POINT4D *p, const SPHEROID *s, double f)
Find the interpolation point p between geography points p1 and p2 so that len(p1,p) == len(p1,...
Definition: tpoint_spatialfuncs.c:382
GSERIALIZED * geo_serialize(const LWGEOM *geom)
Serialize a geometry/geography.
Definition: postgis_funcs.c:1987
int16 spatial_flags(Datum d, meosType basetype)
Get the MEOS flags from a spatial value.
Definition: tgeo_spatialfuncs.c:437
bool mline_type(const GSERIALIZED *gs)
Ensure that the geometry/geography is a (multi)line.
Definition: tgeo_spatialfuncs.c:790
bool ensure_has_Z_geo(const GSERIALIZED *gs)
Ensure that the geometry/geography has not Z dimension.
Definition: tgeo_spatialfuncs.c:712
bool ensure_same_geodetic_stbox_geo(const STBox *box, const GSERIALIZED *gs)
Ensure that a spatiotemporal box and a geometry/geography have both planar or geodetic coordinates.
Definition: tgeo_spatialfuncs.c:696
int tpointseq_stops_iter(const TSequence *seq, double maxdist, int64 mintunits, TSequence **result)
Return the subsequences where the temporal value stays within an area with a given maximum size for a...
Definition: tpoint_spatialfuncs.c:3370
Datum datum2_geog_centroid(Datum geo)
Return the centroid of a geography.
Definition: tgeo_spatialfuncs.c:289
bool ensure_not_geodetic_geo(const GSERIALIZED *gs)
Ensure that the geometry has planar coordinates.
Definition: tgeo_spatialfuncs.c:764
int tgeogpointsegm_intersection(Datum start1, Datum end1, Datum start2, Datum end2, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
Return 1 or 2 if two temporal geography point segments intersect during the period defined by the out...
Definition: tpoint_spatialfuncs.c:575
LWLINE * lwline_make(Datum value1, Datum value2)
Return the line connecting two geometry points.
Definition: tpoint_spatialfuncs.c:723
GSERIALIZED * geopoint_make(double x, double y, double z, bool hasz, bool geodetic, int32_t srid)
Return a point created from the arguments.
Definition: tgeo_spatialfuncs.c:106
Datum pointsegm_interpolate(Datum start, Datum end, long double ratio)
Return a point interpolated from the geometry/geography segment with respect to the fraction of its t...
Definition: tpoint_spatialfuncs.c:436
bool ensure_same_spatial_dimensionality(int16 flags1, int16 flags2)
Ensure that two temporal points have the same spatial dimensionality as given by their flags.
Definition: tgeo_spatialfuncs.c:622
bool ensure_valid_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure the validity of a temporal geo and a spatiotemporal box.
Definition: tgeo_spatialfuncs.c:875
bool ensure_valid_tspatial_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure the validity of a spatiotemporal value and a geometry/geography.
Definition: tgeo_spatialfuncs.c:847
bool ensure_same_spatial_dimensionality_stbox_geo(const STBox *box, const GSERIALIZED *gs)
Ensure that a spatiotemporal box and a geometry/geography have the same spatial dimensionality.
Definition: tgeo_spatialfuncs.c:678
LWGEOM * lwcircle_make(double x, double y, double radius, int32_t srid)
Return a circle created from a central point and a radius.
Definition: tcbuffer_spatialfuncs.c:101
Datum datum_geom_distance2d(Datum geom1, Datum geom2)
Return the 2D distance between the two geometries.
Definition: tgeo_spatialfuncs.c:330
bool ensure_same_geodetic(int16 flags1, int16 flags2)
Ensure that the spatiotemporal argument have the same type of coordinates, either planar or geodetic.
Definition: tgeo_spatialfuncs.c:500
bool ensure_not_empty(const GSERIALIZED *gs)
Ensure that the geometry/geography is not empty.
Definition: tgeo_spatialfuncs.c:815
bool ensure_same_dimensionality_geo(const GSERIALIZED *gs1, const GSERIALIZED *gs2)
Ensure that two geometries/geographies have the same dimensionality.
Definition: tgeo_spatialfuncs.c:636
bool ensure_same_dimensionality_tspatial_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure that a spatiotemporal value and a geometry/geography have the same dimensionality.
Definition: tgeo_spatialfuncs.c:663
bool ensure_valid_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2)
Ensure that two temporal numbers have the same span type.
Definition: tgeo_spatialfuncs.c:937
datum_func2 geo_distance_fn(int16 flags)
Select the appropriate distance function.
Definition: tgeo_spatialfuncs.c:303
bool geopoint_collinear(Datum value1, Datum value2, Datum value3, double ratio, bool hasz, bool geodetic)
Return true if the three values are collinear.
Definition: tpoint_spatialfuncs.c:596
bool ensure_same_dimensionality(int16 flags1, int16 flags2)
Ensure that two temporal points have the same dimensionality as given by their flags.
Definition: tgeo_spatialfuncs.c:593
bool geopoint_same(const GSERIALIZED *gs1, const GSERIALIZED *gs2)
Return true if the points are equal taking into account floating point imprecision.
Definition: tgeo_spatialfuncs.c:201
Datum datum_geog_distance(Datum geog1, Datum geog2)
Return the distance between the two geographies.
Definition: tgeo_spatialfuncs.c:350
bool ensure_valid_tspatial_base(const Temporal *temp, Datum base)
Ensure the validity of a spatiotemporal value and a geometry/geography.
Definition: tgeo_spatialfuncs.c:892
long double closest_point3dz_on_segment_ratio(const POINT3DZ *p, const POINT3DZ *A, const POINT3DZ *B, POINT3DZ *closest)
Return a long double between 0 and 1 representing the location of the closest point on the 3D segment...
Definition: tpoint_spatialfuncs.c:292
bool geopoint_eq(const GSERIALIZED *gs1, const GSERIALIZED *gs2)
Return true if the points are equal.
Definition: tgeo_spatialfuncs.c:159
bool ensure_valid_spatial_stbox_stbox(const STBox *box1, const STBox *box2)
Ensure the validity of a spatiotemporal boxes.
Definition: tgeo_spatialfuncs.c:860
bool ensure_circle_type(const GSERIALIZED *gs)
Ensure that the geometry/geography is a circle.
Definition: tcbuffer_spatialfuncs.c:78
bool datum_point_same(Datum point1, Datum point2)
Return true if the points are equal taking into account floating point imprecision.
Definition: tgeo_spatialfuncs.c:227
Datum datum_geom_distance3d(Datum geom1, Datum geom2)
Return the 3D distance between the two geometries.
Definition: tgeo_spatialfuncs.c:340
Datum datum2_point_same(Datum point1, Datum point2)
int const GSERIALIZED * gs
Definition: trgeo_spatialrels.h:52
int const GSERIALIZED bool ever
Definition: trgeo_spatialrels.h:53