MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
tnpoint.h File Reference
#include <postgres.h>
#include <meos_npoint.h>
#include "temporal/temporal.h"

Go to the source code of this file.

Macros

#define DatumGetNpointP(X)   ((Npoint *) DatumGetPointer(X))
 Functions for temporal network points. More...
 
#define DatumGetNsegmentP(X)   ((Nsegment *) DatumGetPointer(X))
 
#define GEOM_TO_NPOINT   false
 
#define NPOINT_TO_GEOM   true
 Symbolic constants for transforming tnpoint <-> tgeompoint. More...
 
#define NpointPGetDatum(X)   PointerGetDatum(X)
 
#define NsegmentPGetDatum(X)   PointerGetDatum(X)
 
#define PG_GETARG_NPOINT_P(X)   DatumGetNpointP(PG_GETARG_DATUM(X))
 
#define PG_GETARG_NSEGMENT_P(X)   DatumGetNsegmentP(PG_GETARG_DATUM(X))
 
#define PG_RETURN_NPOINT_P(X)   PG_RETURN_POINTER(X)
 
#define PG_RETURN_NSEGMENT_P(X)   PG_RETURN_POINTER(X)
 

Functions

bool common_rid_tnpoint_npoint (const Temporal *temp, const Npoint *np)
 Return true if temporal network point and a network point have a common route identifier. More...
 
bool common_rid_tnpoint_npointset (const Temporal *temp, const Set *s)
 Return true if temporal network point and a network point have a common route identifier. More...
 
bool common_rid_tnpoint_tnpoint (const Temporal *temp1, const Temporal *temp2)
 
Datum datum_npoint_round (Datum npoint, Datum size)
 Return a network point with the precision of the position set to a number of decimal places. More...
 
bool ensure_valid_tnpoint_geo (const Temporal *temp, const GSERIALIZED *gs)
 Ensure the validity of a temporal network point and a geometry. More...
 
bool ensure_valid_tnpoint_npoint (const Temporal *temp, const Npoint *np)
 Return true if a temporal network point and a network point are valid for operations. More...
 
bool ensure_valid_tnpoint_npointset (const Temporal *temp, const Set *s)
 Return true if a temporal network point and a network point set are valid for operations. More...
 
bool ensure_valid_tnpoint_stbox (const Temporal *temp, const STBox *box)
 Ensure the validity of a temporal network point and a spatiotemporal box. More...
 
bool ensure_valid_tnpoint_tnpoint (const Temporal *temp1, const Temporal *temp2)
 Return true if a temporal network point and a network point are valid for operations. More...
 
bool npoint_collinear (const Npoint *np1, const Npoint *np2, const Npoint *np3, double ratio)
 Return true if the three values are collinear. More...
 
void npoint_set (int64 rid, double pos, Npoint *np)
 Return in the last argument a network point constructed from a route identifier and a position. More...
 
char * npoint_wkt_out (Datum value, int maxdd)
 Output a network point in the Well-Known Text (WKT) representation (internal function) More...
 
GSERIALIZEDnpointarr_geom (Npoint **points, int count)
 Return a geometry converted from an array of network points. More...
 
Npointnpointsegm_interpolate (const Npoint *start, const Npoint *end, long double ratio)
 Return a network point interpolated from a network point segment with respect to a fraction of its total length. More...
 
long double npointsegm_locate (const Npoint *start, const Npoint *end, const Npoint *value)
 Return a float in (0,1) if a network point segment intersects a network point, return -1.0 if the network point is not located in the segment or if it is approximately equal to the start or the end valuess. More...
 
void nsegment_set (int64 rid, double pos1, double pos2, Nsegment *ns)
 Return in the last argument a network segment constructed from a route identifier and two positions. More...
 
GSERIALIZEDnsegmentarr_geom (Nsegment **segments, int count)
 Return a geometry converted from an array of network segments. More...
 
Nsegment ** nsegmentarr_normalize (Nsegment **segments, int *count)
 Normalize an array of temporal segments. More...
 
TInstanttgeompointinst_tnpointinst (const TInstant *inst)
 Convert a temporal geometry point into a temporal network point. More...
 
TSequencetgeompointseq_tnpointseq (const TSequence *seq)
 Convert a temporal geometry point into a temporal network point. More...
 
TSequenceSettgeompointseqset_tnpointseqset (const TSequenceSet *ss)
 Convert a temporal geometry point into a temporal network point. More...
 
Temporaltnpoint_restrict_npoint (const Temporal *temp, const Npoint *np, bool atfunc)
 Restrict a temporal network point to (the complement of) a network point. More...
 
Temporaltnpoint_restrict_npointset (const Temporal *temp, const Set *s, bool atfunc)
 Restrict a temporal network point to (the complement of) a set of network points. More...
 
Temporaltnpoint_restrict_stbox (const Temporal *temp, const STBox *box, bool border_inc, bool atfunc)
 Return a temporal network point restricted to (the complement of) a spatiotemporal box. More...
 
Nsegment ** tnpointinst_positions (const TInstant *inst)
 Return the network segments covered by the temporal network point. More...
 
int64 tnpointinst_route (const TInstant *inst)
 Return the route of the temporal network point. More...
 
Settnpointinst_routes (const TInstant *inst)
 Return the routes of a temporal network point. More...
 
TInstanttnpointinst_tgeompointinst (const TInstant *inst)
 Convert a temporal network point into a temporal geometry point. More...
 
Settnpointseq_cont_routes (const TSequence *seq)
 Return the routes of a temporal network point. More...
 
Settnpointseq_disc_routes (const TSequence *is)
 Return the routes of a temporal network point. More...
 
Nsegmenttnpointseq_linear_positions (const TSequence *seq)
 Return the network segments covered by the temporal network point. More...
 
Nsegment ** tnpointseq_positions (const TSequence *seq, int *count)
 Return the network segments covered by the temporal network point. More...
 
TSequencetnpointseq_tgeompointseq_cont (const TSequence *seq)
 Convert a temporal network point into a temporal geometry point. More...
 
TSequencetnpointseq_tgeompointseq_disc (const TSequence *is)
 Convert a temporal network point into a temporal geometry point. More...
 
Nsegment ** tnpointseqset_positions (const TSequenceSet *ss, int *count)
 Return the network segments covered by the temporal network point. More...
 
Settnpointseqset_routes (const TSequenceSet *ss)
 Return the routes of a temporal network point. More...
 
TSequenceSettnpointseqset_tgeompointseqset (const TSequenceSet *ss)
 Convert a temporal network point into a temporal geometry point. More...