MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
meos_internal_geo.h File Reference
#include <stddef.h>
#include <json-c/json.h>
#include <proj.h>
#include <meos.h>
#include <meos_geo.h>
#include <meos_internal.h>

Go to the source code of this file.

Macros

#define DATUM_POINT2D_P(gs)   ( (POINT2D *) GS_POINT_PTR(DatumGetGserializedP(gs)) )
 Return a pointer to a 2D/3DZ point from the datum/GSERIALIZED. More...
 
#define DATUM_POINT3DZ_P(gs)   ( (POINT3DZ *) GS_POINT_PTR(DatumGetGserializedP(gs)) )
 
#define DatumGetGserializedP(X)   ((GSERIALIZED *) DatumGetPointer(X))
 Internal API of the Mobility Engine Open Source(MEOS) library. More...
 
#define FLAGS_GET_VERSBIT2(flags)   (((flags) & LWFLAG_VERSBIT2)>>7)
 
#define GS_POINT_PTR(gs)
 
#define GSERIALIZED_POINT2D_P(gs)   ( (POINT2D *) GS_POINT_PTR((gs)) )
 
#define GSERIALIZED_POINT3DZ_P(gs)   ( (POINT3DZ *) GS_POINT_PTR((gs)) )
 
#define GserializedPGetDatum(X)   PointerGetDatum(X)
 
#define LWFLAG_VERSBIT2   0x80
 Definition for the internal aspects of the GSERIALIZED struct. More...
 

Functions

STBoxbox3d_to_stbox (const BOX3D *box)
 Convert a BOX3D into a spatiotemporal box. More...
 
Datum datum_geo_round (Datum value, Datum size)
 Return a geometry with the precision of the coordinates set to a number of decimal places. More...
 
void gbox_set_stbox (const GBOX *box, int32_t srid, STBox *result)
 Set the a spatiotemporal box in the last argument from the GBOX and the SRID. More...
 
bool geo_set_stbox (const GSERIALIZED *gs, STBox *box)
 Return in the last argument the spatiotemporal box of a geometry/geography. More...
 
void geoarr_set_stbox (const Datum *values, int count, STBox *box)
 Return in the last argument a spatiotemporal box constructed from an array of geometries/geographies. More...
 
bool inter_stbox_stbox (const STBox *box1, const STBox *box2, STBox *result)
 Return in the last argument the intersection of two spatiotemporal boxes. More...
 
GSERIALIZEDpoint_round (const GSERIALIZED *gs, int maxdd)
 Return a point with the coordinates set to a number of decimal places. More...
 
PJ_CONTEXT * proj_get_context (void)
 Get the random generator used by temporal aggregation. More...
 
bool spatial_set_srid (Datum d, meosType basetype, int32_t srid)
 Return true if the first argument has been successfully transformed to another SRID. More...
 
bool spatial_set_stbox (Datum d, meosType basetype, STBox *box)
 Return in the last argument a spatiotemporal box constructed from a spatial base value. More...
 
int32_t spatial_srid (Datum d, meosType basetype)
 Return the SRID of a spatial value. More...
 
void spatialset_set_stbox (const Set *set, STBox *box)
 Return in the last argument the bounding box of a spatial set. More...
 
void stbox_expand (const STBox *box1, STBox *box2)
 Return the second spatiotemporal box expanded with the first one. More...
 
GSERIALIZEDstbox_geo (const STBox *box)
 Return a spatiotemporal box converted as a geometry/geography. More...
 
void stbox_set (bool hasx, bool hasz, bool geodetic, int32 srid, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const Span *s, STBox *box)
 Return in the last argument a spatiotemporal box constructed from the given arguments. More...
 
void stbox_set_box3d (const STBox *box, BOX3D *box3d)
 Return in the last argument a BOX3D constructed from a spatiotemporal box. More...
 
void stbox_set_gbox (const STBox *box, GBOX *gbox)
 Return in the last argument a GBOX constructed from a spatiotemporal box. More...
 
Temporaltgeo_restrict_geom (const Temporal *temp, const GSERIALIZED *gs, const Span *zspan, bool atfunc)
 Return a temporal geo restricted to (the complement of) a geometry and possibly a Z span. More...
 
Temporaltgeo_restrict_stbox (const Temporal *temp, const STBox *box, bool border_inc, bool atfunc)
 Return a temporal geo restricted to (the complement of) a spatiotemporal box. More...
 
Temporaltgeo_tpoint (const Temporal *temp, bool oper)
 Return a temporal geo transformed from/to a temporal point. More...
 
TInstanttgeogpointinst_from_mfjson (json_object *mfjson, int32_t srid)
 Return a temporal geography point instant from its MF-JSON representation. More...
 
TInstanttgeogpointinst_in (const char *str)
 Return a temporal instant geography point from its Well-Known Text (WKT) representation. More...
 
TSequencetgeogpointseq_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geography point sequence from its MF-JSON representation. More...
 
TSequencetgeogpointseq_in (const char *str, interpType interp)
 Return a temporal geography point sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSettgeogpointseqset_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geography point sequence set from its MF-JSON representation. More...
 
TSequenceSettgeogpointseqset_in (const char *str)
 Return a temporal geography point sequence set from its Well-Known Text (WKT) representation. More...
 
TInstanttgeographyinst_from_mfjson (json_object *mfjson, int32_t srid)
 Return a temporal geography instant from its MF-JSON representation. More...
 
TInstanttgeographyinst_in (const char *str)
 Return a temporal geography instant from its Well-Known Text (WKT) representation. More...
 
TSequencetgeographyseq_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geography sequence from its MF-JSON representation. More...
 
TSequencetgeographyseq_in (const char *str, interpType interp)
 Return a temporal geography sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSettgeographyseqset_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geography sequence set from its MF-JSON representation. More...
 
TSequenceSettgeographyseqset_in (const char *str)
 Return a temporal geography sequence set from its Well-Known Text (WKT) representation. More...
 
TInstanttgeoinst_restrict_geom (const TInstant *inst, const GSERIALIZED *gs, const Span *zspan, bool atfunc)
 Return a temporal geo instant restricted to (the complement of) a geometry and possibly a Z span and a timestamptz span. More...
 
TInstanttgeoinst_restrict_stbox (const TInstant *inst, const STBox *box, bool border_inc, bool atfunc)
 Return a temporal geo instant restricted to (the complement of) a spatiotemporal box. More...
 
void tgeoinst_set_stbox (const TInstant *inst, STBox *box)
 Return in the last argument the spatiotemporal box of a temporal geo instant. More...
 
Temporaltgeom_tgeog (const Temporal *temp, bool oper)
 Return a temporal geometry/geography transformed from/to a temporal geometry/geography. More...
 
TInstanttgeometryinst_from_mfjson (json_object *mfjson, int32_t srid)
 Return a temporal geometry instant from its MF-JSON representation. More...
 
TInstanttgeometryinst_in (const char *str)
 Return a temporal geometry instant from its Well-Known Text (WKT) representation. More...
 
TSequencetgeometryseq_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geometry sequence from its MF-JSON representation. More...
 
TSequencetgeometryseq_in (const char *str, interpType interp)
 Return a temporal geometry sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSettgeometryseqset_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geometry sequence set from its MF-JSON representation. More...
 
TSequenceSettgeometryseqset_in (const char *str)
 Return a temporal geometry sequence set from its Well-Known Text (WKT) representation. More...
 
TInstanttgeominst_tgeoginst (const TInstant *inst, bool oper)
 Return a temporal geometry/geography transformed from/to a temporal geometry/geography. More...
 
TInstanttgeompointinst_from_mfjson (json_object *mfjson, int32_t srid)
 Return a temporal geometry point instant from its MF-JSON representation. More...
 
TInstanttgeompointinst_in (const char *str)
 Return a temporal geometry point instant from its Well-Known Text (WKT) representation. More...
 
TSequencetgeompointseq_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geometry point sequence from its MF-JSON representation. More...
 
TSequencetgeompointseq_in (const char *str, interpType interp)
 Return a temporal geometry point sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSettgeompointseqset_from_mfjson (json_object *mfjson, int32_t srid, interpType interp)
 Return a temporal geometry point sequence set from its MF-JSON representation. More...
 
TSequenceSettgeompointseqset_in (const char *str)
 Return a temporal geometry point sequence set from its Well-Known Text (WKT) representation. More...
 
TSequencetgeomseq_tgeogseq (const TSequence *seq, bool oper)
 Return a temporal geometry/geography transformed from/to a temporal geometry/geography. More...
 
TSequenceSettgeomseqset_tgeogseqset (const TSequenceSet *ss, bool oper)
 Return a temporal geometry/geography transformed from/to a temporal geometry/geography. More...
 
Temporaltgeoseq_restrict_geom (const TSequence *seq, const GSERIALIZED *gs, const Span *zspan, bool atfunc)
 Return a temporal geo sequence restricted to (the complement of) a geometry and possibly a Z span and a timestamptz span. More...
 
Temporaltgeoseq_restrict_stbox (const TSequence *seq, const STBox *box, bool border_inc, bool atfunc)
 Return a temporal geo sequence restricted to (the complement of) a spatiotemporal box. More...
 
STBoxtgeoseq_split_n_stboxes (const TSequence *seq, int max_count, int *count)
 Return an array of N spatiotemporal boxes from the instants or segments of a temporal geo sequence, where the choice between instants or segments depends, respectively, on whether the interpolation is discrete or continuous. More...
 
STBoxtgeoseq_stboxes (const TSequence *seq, int *count)
 Return an array of spatiotemporal boxes from the instants or segments of a temporal geo sequence, where the choice between instants or segments depends, respectively, on whether the interpolation is discrete or continuous. More...
 
TSequenceSettgeoseqset_restrict_geom (const TSequenceSet *ss, const GSERIALIZED *gs, const Span *zspan, bool atfunc)
 Return a temporal geo sequence set restricted to (the complement of) a geometry and possibly a Z span and a timestamptz span. More...
 
TSequenceSettgeoseqset_restrict_stbox (const TSequenceSet *ss, const STBox *box, bool border_inc, bool atfunc)
 Return a temporal geo sequence set restricted to (the complement of) a spatiotemporal box. More...
 
STBoxtgeoseqset_split_n_stboxes (const TSequenceSet *ss, int max_count, int *count)
 Return an array of N spatiotemporal boxes from the segments of a temporal geo sequence set. More...
 
STBoxtgeoseqset_stboxes (const TSequenceSet *ss, int *count)
 Return an array of spatiotemporal boxes from the segments of a temporal geo sequence set. More...
 
Temporaltpoint_get_coord (const Temporal *temp, int coord)
 Return one of the coordinates of a temporal point as a temporal float. More...
 
TSequenceSettpointseq_azimuth (const TSequence *seq)
 Return the temporal azimuth of a temporal geometry point sequence. More...
 
TSequencetpointseq_cumulative_length (const TSequence *seq, double prevlength)
 Return the cumulative length traversed by a temporal point sequence. More...
 
bool tpointseq_is_simple (const TSequence *seq)
 Return true if a temporal point does not self-intersect. More...
 
double tpointseq_length (const TSequence *seq)
 Return the length traversed by a temporal point sequence. More...
 
GSERIALIZEDtpointseq_linear_trajectory (const TSequence *seq, bool unary_union)
 Return the trajectory of a temporal point sequence. More...
 
TSequencetpointseq_make_coords (const double *xcoords, const double *ycoords, const double *zcoords, const TimestampTz *times, int count, int32 srid, bool geodetic, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
 Return a temporal sequence from arrays of coordinates, one per dimension, and timestamps. More...
 
TSequence ** tpointseq_make_simple (const TSequence *seq, int *count)
 Return a temporal point sequence split into an array of non self-intersecting fragments. More...
 
TSequencetpointseq_speed (const TSequence *seq)
 Return the speed of a temporal point sequence. More...
 
GSERIALIZEDtpointseq_twcentroid (const TSequence *seq)
 Return the time-weighed centroid of a temporal geometry point sequence. More...
 
TSequenceSettpointseqset_azimuth (const TSequenceSet *ss)
 Return the temporal azimuth of a temporal geometry point sequence set. More...
 
TSequenceSettpointseqset_cumulative_length (const TSequenceSet *ss)
 Return the cumulative length traversed by a temporal point sequence set. More...
 
bool tpointseqset_is_simple (const TSequenceSet *ss)
 Return true if a temporal point does not self-intersect. More...
 
double tpointseqset_length (const TSequenceSet *ss)
 Return the length traversed by a temporal point sequence set. More...
 
TSequence ** tpointseqset_make_simple (const TSequenceSet *ss, int *count)
 Return a temporal point sequence set split into an array of non self-intersecting fragments. More...
 
TSequenceSettpointseqset_speed (const TSequenceSet *ss)
 Return the speed of a temporal point sequence set. More...
 
GSERIALIZEDtpointseqset_twcentroid (const TSequenceSet *ss)
 Return the time-weighed centroid of a temporal geometry point sequence set. More...
 
void tspatial_set_stbox (const Temporal *temp, STBox *box)
 Return in the last argument the spatiotemporal box of a temporal spatial value. More...
 
void tspatialinst_set_srid (TInstant *inst, int32_t srid)
 Set the coordinates of a spatiotemporal instant to an SRID. More...
 
int tspatialinst_srid (const TInstant *inst)
 Return the SRID of a spatiotemporal instant. More...
 
void tspatialseq_set_srid (TSequence *seq, int32_t srid)
 Set the coordinates of a spatiotemporal sequence to an SRID. More...
 
void tspatialseq_set_stbox (const TSequence *seq, STBox *box)
 Return in the last argument the spatiotemporal box of a temporal spatial sequence. More...
 
void tspatialseqset_set_srid (TSequenceSet *ss, int32_t srid)
 Set the coordinates of a spatiotemporal sequence set to an SRID. More...
 
void tspatialseqset_set_stbox (const TSequenceSet *ss, STBox *box)
 Return in the last argument the spatiotemporal box of a temporal spatial sequence set. More...
 
void tstzset_set_stbox (const Set *s, STBox *box)
 Return in the last argument a spatiotemporal box constructed from a timestamptz set. More...
 
void tstzspan_set_stbox (const Span *s, STBox *box)
 Return in the last argument a spatiotemporal box constructed from a timestamptz span. More...
 
void tstzspanset_set_stbox (const SpanSet *s, STBox *box)
 Return in the last argument a spatiotemporal box constructed from a timestamptz span set. More...