32 #ifndef __TNPOINT_STATIC_H__ 33 #define __TNPOINT_STATIC_H__ 36 #include <catalog/pg_type.h> Datum npoint_lt(PG_FUNCTION_ARGS)
Returns true if the first network point is less than the second one.
Definition: tnpoint_static.c:721
npoint * geom_as_npoint_internal(Datum geom)
Transforms the geometry into a network point.
Definition: tnpoint_static.c:1086
Datum npoint_position(PG_FUNCTION_ARGS)
Returns the position of the network point.
Definition: tnpoint_static.c:533
bool npoint_ge_internal(const npoint *np1, const npoint *np2)
Datum nsegment_eq(PG_FUNCTION_ARGS)
Returns true if the first network segment is equal to the second one.
Definition: tnpoint_static.c:787
Datum route_geom(int64 rid)
Access the edge table to get the route geometry from corresponding route identifier.
Definition: tnpoint_static.c:971
Datum nsegment_start_position(PG_FUNCTION_ARGS)
Returns the start position of the network segment.
Definition: tnpoint_static.c:555
Datum nsegment_lt(PG_FUNCTION_ARGS)
Returns true if the first network segment is less than the second one.
Definition: tnpoint_static.c:861
ArrayType * npointarr_to_array(npoint **npointarr, int count)
Datum nsegment_from_npoint(PG_FUNCTION_ARGS)
Construct an network segment value from the network point.
Definition: tnpoint_static.c:505
void npoint_set(npoint *np, int64 rid, double pos)
Datum nsegmentarr_to_geom_internal(nsegment **segments, int count)
Convert a network segment array into a geometry.
Definition: tnpoint_static.c:153
Datum nsegment_as_geom_internal(const nsegment *ns)
Transforms the network segment into a geometry.
Definition: tnpoint_static.c:1172
nsegment * geom_as_nsegment_internal(Datum line)
Transforms the geometry into a network segment.
Definition: tnpoint_static.c:1202
bool nsegment_ge_internal(const nsegment *ns1, const nsegment *ns2)
Datum nsegment_ge(PG_FUNCTION_ARGS)
Returns true if the first network segment is greater than or equal to the second one.
Definition: tnpoint_static.c:889
void npointarr_sort(npoint **points, int count)
ArrayType * int64arr_to_array(const int64 *int64arr, int count)
Convert a C array of int64 values into a PostgreSQL array.
Definition: tnpoint_static.c:67
bool npoint_gt_internal(const npoint *np1, const npoint *np2)
Datum nsegment_recv(PG_FUNCTION_ARGS)
Receive function for network segments.
Definition: tnpoint_static.c:366
Datum nsegment_le(PG_FUNCTION_ARGS)
Returns true if the first network segment is less than or equal to the second one.
Definition: tnpoint_static.c:875
Datum nsegment_send(PG_FUNCTION_ARGS)
Send function for network segments.
Definition: tnpoint_static.c:383
Datum geom_as_npoint(PG_FUNCTION_ARGS)
Transforms the geometry into a network point.
Definition: tnpoint_static.c:1125
Datum geom_as_nsegment(PG_FUNCTION_ARGS)
Transforms the geometry into a network segment.
Definition: tnpoint_static.c:1263
bool nsegment_gt_internal(const nsegment *ns1, const nsegment *ns2)
Datum npoint_ne(PG_FUNCTION_ARGS)
Returns true if the first network point is not equal to the second one.
Definition: tnpoint_static.c:661
int npoint_remove_duplicates(npoint **values, int count)
Datum nsegment_gt(PG_FUNCTION_ARGS)
Returns true if the first network segment is greater than the second one.
Definition: tnpoint_static.c:902
Datum npoint_set_precision_internal(Datum npoint, Datum size)
Set the precision of the position of a network point to the number of decimal places.
Definition: tnpoint_static.c:581
nsegment ** nsegmentarr_normalize(nsegment **segments, int *count)
Normalize the array of temporal segments.
Definition: tnpoint_static.c:224
bool nsegment_lt_internal(const nsegment *ns1, const nsegment *ns2)
int npoint_cmp_internal(const npoint *np1, const npoint *np2)
Returns -1, 0, or 1 depending on whether the first network point is less than, equal, or greater than the second one.
Definition: tnpoint_static.c:675
bool npoint_le_internal(const npoint *np1, const npoint *np2)
npoint * npoint_make(int64 rid, double pos)
Construct an network point value from the arguments.
Definition: tnpoint_static.c:420
Datum npointarr_to_geom_internal(npoint **points, int count)
Convert a network point array into a geometry.
Definition: tnpoint_static.c:124
Datum npoint_as_geom_internal(const npoint *np)
Transforms the network point into a geometry.
Definition: tnpoint_static.c:1062
bool nsegment_eq_internal(const nsegment *ns1, const nsegment *ns2)
Returns true if the first network segment is equal to the second one.
Definition: tnpoint_static.c:776
Datum npoint_eq(PG_FUNCTION_ARGS)
Returns true if the first network point is equal to the second one.
Definition: tnpoint_static.c:640
Datum nsegment_in(PG_FUNCTION_ARGS)
Input function for network segments Example of input: (1, 0.5, 0.6)
Definition: tnpoint_static.c:342
Datum npoint_gt(PG_FUNCTION_ARGS)
Returns true if the first network point is greater than the second one.
Definition: tnpoint_static.c:762
bool route_exists(int64 rid)
Returns true if the edge table contains a route with the route identifier.
Definition: tnpoint_static.c:918
int64 rid_from_geom(Datum geom)
Datum npoint_ge(PG_FUNCTION_ARGS)
Returns true if the first network point is greater than or equal to the second one.
Definition: tnpoint_static.c:749
void nsegment_set(nsegment *ns, int64 rid, double pos1, double pos2)
Datum npoint_in(PG_FUNCTION_ARGS)
Input function for network points Example of input: (1, 0.5)
Definition: tnpoint_static.c:276
bool npoint_ne_internal(const npoint *np1, const npoint *np2)
Returns true if the first network point is not equal to the second one.
Definition: tnpoint_static.c:651
Functions for temporal network points.
Datum npoint_constructor(PG_FUNCTION_ARGS)
Construct an network point value from the arguments.
Definition: tnpoint_static.c:440
bool npoint_lt_internal(const npoint *np1, const npoint *np2)
Returns true if the first network point is less than the second one.
Definition: tnpoint_static.c:710
Datum npoint_le(PG_FUNCTION_ARGS)
Returns true if the first network point is less than or equal to the second one.
Definition: tnpoint_static.c:735
Datum nsegment_end_position(PG_FUNCTION_ARGS)
Returns the end position of the network segment.
Definition: tnpoint_static.c:566
Datum npoint_send(PG_FUNCTION_ARGS)
Send function for network points.
Definition: tnpoint_static.c:320
Datum npoint_as_geom(PG_FUNCTION_ARGS)
Transforms the network point into a geometry.
Definition: tnpoint_static.c:1075
bool npoint_same_internal(const npoint *np1, const npoint *np2)
Determines the spatial equality for network points.
Definition: tnpoint_spatialfuncs.c:426
Datum nsegment_as_geom(PG_FUNCTION_ARGS)
Transforms the network segment into a geometry.
Definition: tnpoint_static.c:1191
Datum nsegment_ne(PG_FUNCTION_ARGS)
Returns true if the first network segment is not equal to the second one.
Definition: tnpoint_static.c:808
Datum npoint_route(PG_FUNCTION_ARGS)
Returns the route of the network point.
Definition: tnpoint_static.c:521
bool nsegment_ne_internal(const nsegment *ns1, const nsegment *ns2)
Returns true if the first network segment is not equal to the second one.
Definition: tnpoint_static.c:798
int32_t get_srid_ways()
Return the SRID of the routes in the ways table.
Definition: tnpoint_static.c:95
Datum npoint_out(PG_FUNCTION_ARGS)
Output function for network points.
Definition: tnpoint_static.c:288
nsegment * nsegment_make(int64 rid, double pos1, double pos2)
Construct an network segment value from the arguments.
Definition: tnpoint_static.c:470
Datum npoint_recv(PG_FUNCTION_ARGS)
Receive function for network points.
Definition: tnpoint_static.c:304
ArrayType * nsegmentarr_to_array(nsegment **nsegmentarr, int count)
Convert a C array of network segment values into a PostgreSQL array.
Definition: tnpoint_static.c:85
int npoint_srid_internal(const npoint *np)
Returns the SRID of the network point.
Definition: tnpoint_static.c:1037
bool nsegment_le_internal(const nsegment *ns1, const nsegment *ns2)
Datum nsegment_out(PG_FUNCTION_ARGS)
Output function for network segments.
Definition: tnpoint_static.c:354
Datum nsegment_route(PG_FUNCTION_ARGS)
Returns the route of the network segment.
Definition: tnpoint_static.c:544
Datum nsegment_constructor(PG_FUNCTION_ARGS)
Construct an network segment value from the arguments.
Definition: tnpoint_static.c:491
double route_length(int64 rid)
Access the edge table to return the route length from the corresponding route identifier.
Definition: tnpoint_static.c:942
int nsegment_cmp_internal(const nsegment *ns1, const nsegment *ns2)
Returns -1, 0, or 1 depending on whether the first network segment is less than, equal, or greater than the second one.
Definition: tnpoint_static.c:822
bool npoint_eq_internal(const npoint *np1, const npoint *np2)
Returns true if the first network point is equal to the second one.
Definition: tnpoint_static.c:630