MobilityDB  1.0
Functions
tnpoint_spatialfuncs.c File Reference

Geospatial functions for temporal network points. More...

#include "npoint/tnpoint_spatialfuncs.h"
#include <assert.h>
#include <float.h>
#include "general/periodset.h"
#include "general/timeops.h"
#include "general/temporaltypes.h"
#include "general/tempcache.h"
#include "general/temporal_util.h"
#include "point/tpoint_spatialfuncs.h"
#include "point/tpoint_distance.h"
#include "point/tpoint_boxops.h"
#include "npoint/tnpoint.h"
#include "npoint/tnpoint_static.h"
#include "npoint/tnpoint_distance.h"
#include "npoint/tnpoint_tempspatialrels.h"
Include dependency graph for tnpoint_spatialfuncs.c:

Functions

void ensure_same_srid_tnpoint_stbox (const Temporal *temp, const STBOX *box)
 Ensure that the temporal network point and the STBOX have the same SRID. More...
 
void ensure_same_rid_tnpointinst (const TInstant *inst1, const TInstant *inst2)
 Ensure that the temporal network point instants have the same route identifier. More...
 
bool tnpointseq_intersection_value (const TInstant *inst1, const TInstant *inst2, Datum value, TimestampTz *t)
 Returns true if the segment of the temporal network point value intersects the base value at the timestamp. More...
 
int tnpointinst_srid (const TInstant *inst)
 Returns the SRID of a temporal network point of sutbype instant. More...
 
int tnpoint_srid_internal (const Temporal *temp)
 Returns the SRID of a temporal network point (dispatch function) More...
 
PGDLLEXPORT Datum tnpoint_srid (PG_FUNCTION_ARGS)
 Returns the SRID of a temporal network point. More...
 
npoint ** tnpointinstset_npoints (const TInstantSet *ti, int *count)
 Return the network points covered by the temporal network point. More...
 
npoint ** tnpointseq_step_npoints (const TSequence *seq, int *count)
 Return the network points covered by the temporal network point. More...
 
npoint ** tnpointseqset_step_npoints (const TSequenceSet *ts, int *count)
 Return the network points covered by the temporal network point. More...
 
Datum tnpointinst_geom (const TInstant *inst)
 Return the geometry covered by the temporal network point. More...
 
Datum tnpointinstset_geom (const TInstantSet *ti)
 Return the geometry covered by the temporal network point. More...
 
Datum tnpointseq_geom (const TSequence *seq)
 Return the geometry covered by the temporal network point. More...
 
Datum tnpointseqset_geom (const TSequenceSet *ts)
 Return the geometry covered by the temporal network point. More...
 
Datum tnpoint_geom (const Temporal *temp)
 Return the geometry covered by the temporal network point (dispatch function) More...
 
Datum tnpointseq_trajectory1 (const TInstant *inst1, const TInstant *inst2)
 Compute the trajectory of two instants. More...
 
PGDLLEXPORT Datum tnpoint_trajectory (PG_FUNCTION_ARGS)
 Return the geometry covered by the temporal network point. More...
 
bool npoint_same_internal (const npoint *np1, const npoint *np2)
 Determines the spatial equality for network points. More...
 
PGDLLEXPORT Datum npoint_same (PG_FUNCTION_ARGS)
 Determines the spatial equality for network points. More...
 
static double tnpointseq_length (const TSequence *seq)
 Length traversed by the temporal network point. More...
 
static double tnpointseqset_length (const TSequenceSet *ts)
 Length traversed by the temporal network point. More...
 
PGDLLEXPORT Datum tnpoint_length (PG_FUNCTION_ARGS)
 Length traversed by the temporal network point. More...
 
static TInstanttnpointinst_set_zero (const TInstant *inst)
 Cumulative length traversed by the temporal npoint. More...
 
static TInstantSettnpointinstset_set_zero (const TInstantSet *ti)
 Cumulative length traversed by the temporal npoint. More...
 
static TSequencetnpointseq_cumulative_length (const TSequence *seq, double prevlength)
 Cumulative length traversed by the temporal npoint. More...
 
static TSequenceSettnpointseqset_cumulative_length (const TSequenceSet *ts)
 Cumulative length traversed by the temporal npoint. More...
 
PGDLLEXPORT Datum tnpoint_cumulative_length (PG_FUNCTION_ARGS)
 Cumulative length traversed by the temporal npoint. More...
 
static TSequencetnpointseq_speed (const TSequence *seq)
 Speed of the temporal network point. More...
 
static TSequenceSettnpointseqset_speed (const TSequenceSet *ts)
 Speed of the temporal network point. More...
 
PGDLLEXPORT Datum tnpoint_speed (PG_FUNCTION_ARGS)
 Speed of the temporal network point. More...
 
PGDLLEXPORT Datum tnpoint_twcentroid (PG_FUNCTION_ARGS)
 Time-weighed centroid of the temporal network point. More...
 
static TInstant ** tnpointseq_azimuth1 (const TInstant *inst1, const TInstant *inst2, int *count)
 Temporal azimuth of two temporal network point instants. More...
 
static int tnpointseq_azimuth2 (TSequence **result, const TSequence *seq)
 Temporal azimuth of the temporal network point of sequence subtype. More...
 
static TSequenceSettnpointseq_azimuth (const TSequence *seq)
 Temporal azimuth of the temporal network point of sequence subtype. More...
 
static TSequenceSettnpointseqset_azimuth (const TSequenceSet *ts)
 
PGDLLEXPORT Datum tnpoint_azimuth (PG_FUNCTION_ARGS)
 Temporal azimuth of the temporal network point. More...
 
static Datum tnpoint_restrict_geometry (FunctionCallInfo fcinfo, bool atfunc)
 Restrict a temporal network point to (the complement of) a geometry. More...
 
PGDLLEXPORT Datum tnpoint_at_geometry (PG_FUNCTION_ARGS)
 Restricts the temporal point to the geometry. More...
 
PGDLLEXPORT Datum tnpoint_minus_geometry (PG_FUNCTION_ARGS)
 Restrict the temporal point to the complement of the geometry. More...
 

Detailed Description

Geospatial functions for temporal network points.