MobilityDB 1.3
Loading...
Searching...
No Matches
Functions
tgeo_boxops.c File Reference

Bounding box operators for temporal geos. More...

#include "geo/tspatial_boxops.h"
#include <assert.h>
#include <utils/timestamp.h>
#include <liblwgeom.h>
#include <meos.h>
#include <meos_internal.h>
#include <meos_internal_geo.h>
#include "temporal/temporal.h"
#include "geo/stbox.h"
#include "geo/tgeo.h"
#include "geo/tgeo_spatialfuncs.h"

Functions

bool boxop_tspatial_stbox (const Temporal *temp, const STBox *box, bool(*func)(const STBox *, const STBox *), bool inverted)
 Generic bounding box function for a spatiotemporal value and a spatiotemporal box. More...
 
bool boxop_tspatial_tspatial (const Temporal *temp1, const Temporal *temp2, bool(*func)(const STBox *, const STBox *))
 Generic topological function for two spatiotemporal values. More...
 
int edge_calculate_gbox (const POINT3D *A1, const POINT3D *A2, GBOX *gbox)
 
GBOXgeo_gboxes (const GSERIALIZED *gs, int *count)
 Return an array of N spatial boxes obtained by merging consecutive segments of a (multi)line. More...
 
GBOXgeo_split_each_n_gboxes (const GSERIALIZED *gs, int elems_per_box, int *count)
 Return an array of spatial boxes obtained by merging consecutive segments of a (multi)line. More...
 
STBoxgeo_split_each_n_stboxes (const GSERIALIZED *gs, int elems_per_box, int *count)
 Return an array of spatial boxes from the segments of a (multi)linestring @csqlfn Geo_split_each_n_stboxes() More...
 
GBOXgeo_split_n_gboxes (const GSERIALIZED *gs, int box_count, int *count)
 Return an array of N spatial boxes obtained by merging consecutive segments of a (multi)line. More...
 
STBoxgeo_split_n_stboxes (const GSERIALIZED *gs, int box_count, int *count)
 Return an array of N spatial boxes from the segments of a (multi)linestring @sqlfn splitNStboxes() More...
 
STBoxgeo_stboxes (const GSERIALIZED *gs, int *count)
 Return an array of spatial boxes from the segments of a (mult)linestring. More...
 
GBOXline_gboxes (const GSERIALIZED *gs, int *count)
 Return an array of N spatial boxes obtained by merging consecutive segments of a line. More...
 
static int line_gboxes_iter (const LWLINE *lwline, bool geodetic, GBOX *result)
 Return an array of N spatial boxes from the segments of a line (iterator function) More...
 
GBOXline_split_each_n_gboxes (const GSERIALIZED *gs, int elems_per_box, int *count)
 Return an array of spatial boxes obtained by merging consecutive segments of a line. More...
 
static int line_split_each_n_gboxes_iter (const LWLINE *lwline, int elems_per_box, bool geodetic, GBOX *result)
 Return an array of spatial boxes from the segments of a line (iterator function) More...
 
GBOXline_split_n_gboxes (const GSERIALIZED *gs, int box_count, int *count)
 Return an array of N spatial boxes obtained by merging consecutive segments of a line. More...
 
static int line_split_n_gboxes_iter (const LWLINE *lwline, int box_count, bool geodetic, GBOX *result)
 Return an array of N spatial boxes obtained by merging consecutive segments of a line (iterator function) More...
 
void ll2cart (const POINT2D *g, POINT3D *p)
 
void lwpoint_init_gbox (const POINT4D *p, bool hasz, bool hasm, bool geodetic, GBOX *box)
 Return the GBOX in the last argument initialized with a LWPOINT. More...
 
void lwpoint_merge_gbox (const POINT4D *p, bool hasz, bool hasm, bool geodetic, GBOX *box)
 Return the GBOX in the last argument merged with a LWPOINT. More...
 
GBOXmultiline_gboxes (const GSERIALIZED *gs, int *count)
 Return an array of N spatial boxes obtained by merging consecutive segments of a multiline. More...
 
GBOXmultiline_split_each_n_gboxes (const GSERIALIZED *gs, int elems_per_box, int *count)
 Return an array of spatial boxes obtained by merging consecutive segments of a multiline. More...
 
GBOXmultiline_split_n_gboxes (const GSERIALIZED *gs, int box_count, int *count)
 Return an array of N spatial boxes obtained by merging consecutive segments of a multiline. More...
 
void spatialarr_set_bbox (const Datum *values, meosType basetype, int count, void *box)
 Set a bounding box from an array of spatial set values. More...
 
STBoxtgeo_split_each_n_stboxes (const Temporal *temp, int elems_per_box, int *count)
 Return an array of spatiotemporal boxes obtained by merging consecutive instants or segments of a temporal geo, where the choice between instants or segments depends, respectively, on whether the interpolation is discrete or continuous. More...
 
STBoxtgeo_split_n_stboxes (const Temporal *temp, int box_count, int *count)
 Return an array of N spatiotemporal boxes obtained by merging consecutive instants or segments of a temporal geo, where the choice between instants or segments depends, respectively, on whether the interpolation is discrete or continuous. More...
 
STBoxtgeo_stboxes (const Temporal *temp, int *count)
 Return an array of spatiotemporal boxes from the instants or segments of a temporal geo, where the choice between instants or segments depends, respectively, on whether the interpolation is discrete or continuous. More...
 
void tgeoinst_set_stbox (const TInstant *inst, STBox *box)
 Return in the last argument the spatiotemporal box of a temporal geo instant. More...
 
STBoxtgeoinst_stboxes (const TInstant *inst)
 Return a singleton array of spatiotemporal boxes from a temporal geo instant. More...
 
void tgeoinstarr_set_stbox (const TInstant **instants, int count, STBox *box)
 Return in the last argument the spatiotemporal box of an array of temporal geo instants. More...
 
static int tgeoseq_cont_split_each_n_stboxes_iter (const TSequence *seq, int elems_per_box, STBox *result)
 Return an array of spatiotemporal boxes obtained by merging consecutive segments of a temporal geo sequence with continuous interpolation (iterator function) More...
 
static int tgeoseq_cont_split_n_stboxes_iter (const TSequence *seq, int box_count, STBox *result)
 Return an array of N spatiotemporal boxes from the segments of a temporal geo sequence with continuous interpolation (iterator function) More...
 
static int tgeoseq_cont_stboxes_iter (const TSequence *seq, STBox *result)
 Return an array of spatiotemporal boxes from the segments of a temporal geo sequence with continuous interpolation (iterator function) More...
 
static STBoxtgeoseq_disc_split_each_n_stboxes (const TSequence *seq, int elems_per_box, int *count)
 Return an array of spatiotemporal boxes obtained by merging consecutive instants of a temporal geo sequence with discrete interpolation. More...
 
static STBoxtgeoseq_disc_split_n_stboxes (const TSequence *seq, int box_count, int *count)
 Return an array of N spatiotemporal boxes from the instants of a temporal point sequence with discrete interpolation. More...
 
static STBoxtgeoseq_disc_stboxes (const TSequence *seq)
 Return an array of spatiotemporal boxes from the instants of a temporal geo sequence with discrete interpolation. More...
 
void tgeoseq_expand_stbox (TSequence *seq, const TInstant *inst)
 Expand the bounding box of a temporal point sequence with an instant. More...
 
static STBoxtgeoseq_split_each_n_stboxes (const TSequence *seq, int elems_per_box, int *count)
 Return an array of spatiotemporal boxes obtained by merging consecutive 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_split_n_stboxes (const TSequence *seq, int box_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...
 
static STBoxtgeoseqset_split_each_n_stboxes (const TSequenceSet *ss, int elems_per_box, int *count)
 Return an array of spatiotemporal boxes obtained by merging consecutive segments of a temporal geo sequence set. More...
 
STBoxtgeoseqset_split_n_stboxes (const TSequenceSet *ss, int box_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...
 
void tspatialinst_set_stbox (const TInstant *inst, STBox *box)
 Return in the last argument the spatiotemporal box of a temporal spatial instant. More...
 
void tspatialinstarr_set_stbox (const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, void *box)
 Set a bounding box from an array of spatiotemporal instant values. More...
 
void tspatialseq_expand_stbox (TSequence *seq, const TInstant *inst)
 Expand the bounding box of a spatiotemporal sequence with an additional instant. 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 tspatialseqarr_set_stbox (const TSequence **sequences, int count, STBox *box)
 Return in the last argument the spatiotemporal box of an array of temporal geo sequences. 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...
 

Detailed Description

Bounding box operators for temporal geos.

These operators test the bounding boxes of temporal points, which are an STBox, where the x, y, and optional z coordinates are for the space (value) dimension and the t coordinate is for the time dimension. The following operators are defined: overlaps, contains, contained, same.

The operators consider as many dimensions as they are shared in both arguments: only the space dimension, only the time dimension, or both the space and the time dimensions.