MobilityDB 1.1
Functions
tpoint_distance.c File Reference
#include "point/tpoint_distance.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <lwgeodetic_tree.h>
#include <measures.h>
#include <measures3d.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/lifting.h"
#include "general/temporaltypes.h"
#include "general/type_util.h"
#include "point/pgis_call.h"
#include "point/geography_funcs.h"
#include "point/tpoint.h"
#include "point/tpoint_spatialfuncs.h"
Include dependency graph for tpoint_distance.c:

Functions

Temporaldistance_tpoint_geo (const Temporal *temp, const GSERIALIZED *geo)
 Return the temporal distance between a temporal point and a geometry/geography point. More...
 
Temporaldistance_tpoint_tpoint (const Temporal *temp1, const Temporal *temp2)
 Return the temporal distance between two temporal points. More...
 
static double lw_distance_fraction (const LWGEOM *lw1, const LWGEOM *lw2, int mode, long double *fraction)
 Distance functions for temporal points. More...
 
double nad_stbox_geo (const STBox *box, const GSERIALIZED *gs)
 Return the nearest approach distance between a spatiotemporal box and a geometry. More...
 
double nad_stbox_stbox (const STBox *box1, const STBox *box2)
 Return the nearest approach distance between the spatio-temporal boxes. More...
 
double nad_tpoint_geo (const Temporal *temp, const GSERIALIZED *gs)
 Return the nearest approach distance between a temporal point and a geometry. More...
 
double nad_tpoint_stbox (const Temporal *temp, const STBox *box)
 Return the nearest approach distance between a temporal point and a spatio-temporal box. More...
 
double nad_tpoint_tpoint (const Temporal *temp1, const Temporal *temp2)
 Return the nearest approach distance between the temporal points. More...
 
TInstantnai_tpoint_geo (const Temporal *temp, const GSERIALIZED *gs)
 Return the nearest approach instant between a temporal point and a geometry. More...
 
TInstantnai_tpoint_tpoint (const Temporal *temp1, const Temporal *temp2)
 Return the nearest approach instant between the temporal points. More...
 
static double NAI_tpointsegm_linear_geo1 (const TInstant *inst1, const TInstant *inst2, const LWGEOM *geo, TimestampTz *t)
 Return the distance and the timestamp of the nearest approach instant between the temporal sequence point with linear interpolation and the geometry/geography. More...
 
static TInstantNAI_tpointseq_discstep_geo (const TSequence *seq, const LWGEOM *geo)
 Return the nearest approach instant between the temporal sequence point with step interpolation and a geometry/geography. More...
 
static double NAI_tpointseq_discstep_geo1 (const TSequence *seq, const LWGEOM *geo, double mindist, const TInstant **result)
 Return the new current nearest approach instant between the temporal sequence point with step interpolation and a geometry/geography. More...
 
static TInstantNAI_tpointseq_linear_geo (const TSequence *seq, const LWGEOM *geo)
 Return the nearest approach instant between the temporal sequence point with linear interpolation and a geometry. More...
 
static double NAI_tpointseq_linear_geo2 (const TSequence *seq, const LWGEOM *geo, double mindist, TimestampTz *t)
 Return the distance and the timestamp of the nearest approach instant between the temporal sequence point with linear interpolation and the geometry/geography. More...
 
static TInstantNAI_tpointseqset_linear_geo (const TSequenceSet *ss, const LWGEOM *geo)
 Return the nearest approach instant between the temporal sequence set point with linear interpolation and a geometry. More...
 
static TInstantNAI_tpointseqset_step_geo (const TSequenceSet *ss, const LWGEOM *geo)
 Return the nearest approach instant between the temporal sequence set point with step interpolation and a geometry/geography. More...
 
static bool point2d_min_dist (const POINT2D *p1, const POINT2D *p2, const POINT2D *p3, const POINT2D *p4, double *fraction)
 Compute d/dx (Euclidean distance) = 0 for two 2D segments. More...
 
static bool point3d_min_dist (const POINT3DZ *p1, const POINT3DZ *p2, const POINT3DZ *p3, const POINT3DZ *p4, double *fraction)
 Compute d/dx (Euclidean distance) = 0 for two 3D segments. More...
 
bool shortestline_tpoint_geo (const Temporal *temp, const GSERIALIZED *gs, GSERIALIZED **result)
 Return the line connecting the nearest approach point between a temporal point and a geometry. More...
 
bool shortestline_tpoint_tpoint (const Temporal *temp1, const Temporal *temp2, GSERIALIZED **result)
 Return the line connecting the nearest approach point between the temporal points. More...
 
static bool tgeogpoint_min_dist_at_timestamp (const TInstant *start1, const TInstant *end1, const TInstant *start2, const TInstant *end2, Datum *mindist, TimestampTz *t)
 Return the single timestamp at which the two temporal geographic point segments are at the minimum distance. More...
 
static bool tgeompoint_min_dist_at_timestamp (const TInstant *start1, const TInstant *end1, const TInstant *start2, const TInstant *end2, Datum *value, TimestampTz *t)
 Return the value and timestamp at which the two temporal geometric point segments are at the minimum distance. More...
 
static bool tpoint_geo_min_dist_at_timestamp (const TInstant *start, const TInstant *end, Datum point, meosType basetype, Datum *value, TimestampTz *t)
 Return the value and timestamp at which the a temporal point segment and a point are at the minimum distance. More...
 
static bool tpoint_min_dist_at_timestamp (const TInstant *start1, const TInstant *end1, const TInstant *start2, const TInstant *end2, Datum *value, TimestampTz *t)
 Return the value and timestamp at which the two temporal point segments are at the minimum distance. More...