41#include "temporal/temporal.h"
48#define DatumGetNpointP(X) ((Npoint *) DatumGetPointer(X))
49#define NpointPGetDatum(X) PointerGetDatum(X)
50#define PG_GETARG_NPOINT_P(X) DatumGetNpointP(PG_GETARG_DATUM(X))
51#define PG_RETURN_NPOINT_P(X) PG_RETURN_POINTER(X)
54#define DatumGetNsegmentP(X) ((Nsegment *) DatumGetPointer(X))
55#define NsegmentPGetDatum(X) PointerGetDatum(X)
56#define PG_GETARG_NSEGMENT_P(X) DatumGetNsegmentP(PG_GETARG_DATUM(X))
57#define PG_RETURN_NSEGMENT_P(X) PG_RETURN_POINTER(X)
82 const Npoint *np3,
double ratio);
119#define NPOINT_TO_GEOM true
120#define GEOM_TO_NPOINT false
145 bool border_inc,
bool atfunc);
GSERIALIZED * npointarr_geom(Npoint **points, int count)
Return a geometry converted from an array of network points.
Definition: npoint.c:1473
GSERIALIZED * nsegmentarr_geom(Nsegment **segments, int count)
Return a geometry converted from an array of network segments.
Definition: npoint.c:1503
Temporal * tnpoint_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.
Definition: tnpoint_spatialfuncs.c:600
Temporal * tnpoint_restrict_npoint(const Temporal *temp, const Npoint *np, bool atfunc)
Restrict a temporal network point to (the complement of) a network point.
Definition: tnpoint.c:742
Temporal * tnpoint_restrict_npointset(const Temporal *temp, const Set *s, bool atfunc)
Restrict a temporal network point to (the complement of) a set of network points.
Definition: tnpoint.c:793
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
long int int64
Definition: postgres_ext_defs.in.h:12
Definition: postgis_ext_defs.in.h:170
API of the Mobility Engine Open Source (MEOS) library.
Definition: meos_npoint.h:52
Definition: meos_npoint.h:60
Structure to represent spatiotemporal boxes.
Definition: meos.h:134
Structure to represent sets of values.
Definition: meos.h:80
Structure to represent temporal values of instant subtype.
Definition: meos.h:185
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:224
Structure to represent temporal values of sequence subtype.
Definition: meos.h:202
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
bool npoint_collinear(const Npoint *np1, const Npoint *np2, const Npoint *np3, double ratio)
Return true if the three values are collinear.
Definition: npoint.c:87
TInstant * tgeompointinst_tnpointinst(const TInstant *inst)
Convert a temporal geometry point into a temporal network point.
Definition: tnpoint.c:363
TSequenceSet * tnpointseqset_tgeompointseqset(const TSequenceSet *ss)
Convert a temporal network point into a temporal geometry point.
Definition: tnpoint.c:322
Set * tnpointseqset_routes(const TSequenceSet *ss)
Return the routes of a temporal network point.
Definition: tnpoint.c:664
Set * tnpointseq_cont_routes(const TSequence *seq)
Return the routes of a temporal network point.
Definition: tnpoint.c:652
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.
Definition: npoint.c:1129
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.
Definition: npoint.c:1548
TSequenceSet * tgeompointseqset_tnpointseqset(const TSequenceSet *ss)
Convert a temporal geometry point into a temporal network point.
Definition: tnpoint.c:398
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.
Definition: npoint.c:1166
bool ensure_valid_tnpoint_stbox(const Temporal *temp, const STBox *box)
Ensure the validity of a temporal network point and a spatiotemporal box.
Definition: tnpoint.c:153
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.
Definition: tnpoint.c:107
char * npoint_wkt_out(Datum value, int maxdd)
Output a network point in the Well-Known Text (WKT) representation (internal function)
Definition: npoint.c:962
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....
Definition: tnpoint_spatialfuncs.c:81
bool ensure_valid_tnpoint_geo(const Temporal *temp, const GSERIALIZED *gs)
Ensure the validity of a temporal network point and a geometry.
Definition: tnpoint.c:138
int64 tnpointinst_route(const TInstant *inst)
Return the route of the temporal network point.
Definition: tnpoint.c:593
Nsegment ** nsegmentarr_normalize(Nsegment **segments, int *count)
Normalize an array of temporal segments.
Definition: npoint.c:721
Set * tnpointinst_routes(const TInstant *inst)
Return the routes of a temporal network point.
Definition: tnpoint.c:624
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.
Definition: tnpoint.c:168
Nsegment ** tnpointinst_positions(const TInstant *inst)
Return the network segments covered by the temporal network point.
Definition: tnpoint.c:452
TInstant * tnpointinst_tgeompointinst(const TInstant *inst)
Convert a temporal network point into a temporal geometry point.
Definition: tnpoint.c:266
TSequence * tgeompointseq_tnpointseq(const TSequence *seq)
Convert a temporal geometry point into a temporal network point.
Definition: tnpoint.c:376
Set * tnpointseq_disc_routes(const TSequence *is)
Return the routes of a temporal network point.
Definition: tnpoint.c:635
Npoint * npointsegm_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 to...
Definition: tnpoint_spatialfuncs.c:59
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.
Definition: tnpoint.c:57
Nsegment ** tnpointseq_positions(const TSequence *seq, int *count)
Return the network segments covered by the temporal network point.
Definition: tnpoint.c:504
Nsegment * tnpointseq_linear_positions(const TSequence *seq)
Return the network segments covered by the temporal network point.
Definition: tnpoint.c:485
bool common_rid_tnpoint_tnpoint(const Temporal *temp1, const Temporal *temp2)
TSequence * tnpointseq_tgeompointseq_disc(const TSequence *is)
Convert a temporal network point into a temporal geometry point.
Definition: tnpoint.c:277
Nsegment ** tnpointseqset_positions(const TSequenceSet *ss, int *count)
Return the network segments covered by the temporal network point.
Definition: tnpoint.c:556
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.
Definition: tnpoint.c:71
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.
Definition: tnpoint.c:123
TSequence * tnpointseq_tgeompointseq_cont(const TSequence *seq)
Convert a temporal network point into a temporal geometry point.
Definition: tnpoint.c:291
int const GSERIALIZED * gs
Definition: trgeo_spatialrels.h:52