PGROUTING  3.2
edges_input.h File Reference
#include <stddef.h>
#include "c_types/pgr_costFlow_t.h"
#include "c_types/pgr_flow_t.h"
#include "c_types/pgr_basic_edge_t.h"
#include "c_types/pgr_edge_t.h"
#include "c_types/pgr_edge_xy_t.h"
Include dependency graph for edges_input.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void pgr_get_basic_edges (char *sql, pgr_basic_edge_t **edges, size_t *total_edges)
 read basic edges More...
 
void pgr_get_costFlow_edges (char *sql, pgr_costFlow_t **edges, size_t *total_edges)
 read edges for cost flow More...
 
void pgr_get_edges (char *edges_sql, pgr_edge_t **edges, size_t *total_edges)
 basic edge_sql More...
 
void pgr_get_edges_no_id (char *edges_sql, pgr_edge_t **edges, size_t *total_edges)
 edges_sql without id parameter More...
 
void pgr_get_edges_reversed (char *edges_sql, pgr_edge_t **edges, size_t *total_edges)
 
void pgr_get_edges_xy (char *edges_sql, Pgr_edge_xy_t **edges, size_t *total_edges)
 Edges with x, y vertices values. More...
 
void pgr_get_edges_xy_reversed (char *edges_sql, Pgr_edge_xy_t **edges, size_t *total_edges)
 for many to 1 on aStar More...
 
void pgr_get_flow_edges (char *sql, pgr_edge_t **edges, size_t *total_edges)
 read edges for flow More...
 

Function Documentation

◆ pgr_get_basic_edges()

void pgr_get_basic_edges ( char *  sql,
pgr_basic_edge_t **  edges,
size_t *  total_edges 
)

read basic edges

For queries of the type:

SELECT id, source, target, going, [coming]
FROM edge_table;
Parameters
[in]sql
[out]edges
[out]total_edges

Definition at line 766 of file edges_input.c.

769  {
770  bool ignore_id = false;
771  get_edges_basic(sql, edges, total_edges, ignore_id);
772 }

References get_edges_basic().

Referenced by process().

◆ pgr_get_costFlow_edges()

void pgr_get_costFlow_edges ( char *  sql,
pgr_costFlow_t **  edges,
size_t *  total_edges 
)

read edges for cost flow

Edges:

bigint id, bigint source, bigint target, bigint capacity, bigint reverse_capacity float cost, float reverse_cost

Parameters
[in]sql
[out]edges
[out]total_edges

Definition at line 701 of file edges_input.c.

704  {
705  bool ignore_id = false;
706  get_edges_costFlow(sql, edges, total_edges, ignore_id);
707 }

References get_edges_costFlow().

Referenced by process().

◆ pgr_get_edges()

void pgr_get_edges ( char *  edges_sql,
pgr_edge_t **  edges,
size_t *  total_edges 
)

basic edge_sql

For queries of the type:

SELECT id, source, target, cost, [reverse_cost]
FROM edge_table;
Parameters
[in]edges_sql
[out]edges
[out]total_edges

Definition at line 711 of file edges_input.c.

714  {
715  bool ignore_id = false;
716  bool normal = true;
717  get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
718 }

References get_edges_5_columns().

Referenced by compute(), compute_trsp(), process(), and process_combinations().

◆ pgr_get_edges_no_id()

void pgr_get_edges_no_id ( char *  edges_sql,
pgr_edge_t **  edges,
size_t *  total_edges 
)

edges_sql without id parameter

SELECT source, target, cost, [reverse_cost]
FROM edge_table;

Currently used in: allpairs

Parameters
[in]edges_sql
[out]edges
[out]total_edges

Definition at line 733 of file edges_input.c.

736  {
737  bool ignore_id = true;
738  bool normal = true;
739  get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
740 }

References get_edges_5_columns().

Referenced by process().

◆ pgr_get_edges_reversed()

void pgr_get_edges_reversed ( char *  edges_sql,
pgr_edge_t **  edges,
size_t *  total_edges 
)

Definition at line 722 of file edges_input.c.

725  {
726  bool ignore_id = false;
727  bool normal = false;
728  get_edges_5_columns(edges_sql, edges, total_edges, ignore_id, normal);
729 }

References get_edges_5_columns().

Referenced by process().

◆ pgr_get_edges_xy()

void pgr_get_edges_xy ( char *  edges_sql,
Pgr_edge_xy_t **  edges,
size_t *  total_edges 
)

Edges with x, y vertices values.

For queries of the type:

SELECT id, source, target, cost, [reverse_cost], x1, y1, x2, y2
FROM edge_table;
Parameters
[in]edges_sql
[out]edges
[out]total_edges

Definition at line 744 of file edges_input.c.

747  {
748  get_edges_9_columns(edges_sql, edges, total_edges, true);
749 }

References get_edges_9_columns().

Referenced by process().

◆ pgr_get_edges_xy_reversed()

void pgr_get_edges_xy_reversed ( char *  edges_sql,
Pgr_edge_xy_t **  edges,
size_t *  total_edges 
)

for many to 1 on aStar

Used internally

Transforms queries of the type:

SELECT id, source, target, cost, [reverse_cost], x1, y1, x2, y2
FROM edge_table;

to

SELECT id, target, source, cost, [reverse_cost], x1, y1, x2, y2
FROM edge_table;
Parameters
[in]edges_sql
[out]edges
[out]total_edges

Definition at line 757 of file edges_input.c.

760  {
761  get_edges_9_columns(edges_sql, edges, total_edges, false);
762 }

References get_edges_9_columns().

Referenced by process().

◆ pgr_get_flow_edges()

void pgr_get_flow_edges ( char *  sql,
pgr_edge_t **  edges,
size_t *  total_edges 
)

read edges for flow

Edges:

bigint id, bigint source, bigint target, bigint capacity, bigint reverse_capacity

Parameters
[in]sql
[out]edges
[out]total_edges

Definition at line 691 of file edges_input.c.

694  {
695  bool ignore_id = false;
696  get_edges_flow(sql, edges, total_edges, ignore_id);
697 }

References get_edges_flow().

Referenced by process().

get_edges_costFlow
static void get_edges_costFlow(char *sql, pgr_costFlow_t **edges, size_t *totalTuples, bool ignore_id)
Definition: edges_input.c:498
get_edges_9_columns
static void get_edges_9_columns(char *sql, Pgr_edge_xy_t **edges, size_t *total_edges, bool normal)
Definition: edges_input.c:205
get_edges_5_columns
static void get_edges_5_columns(char *sql, pgr_edge_t **edges, size_t *totalTuples, bool ignore_id, bool normal)
Definition: edges_input.c:310
get_edges_basic
static void get_edges_basic(char *sql, pgr_basic_edge_t **edges, size_t *totalTuples, bool ignore_id)
Definition: edges_input.c:596
get_edges_flow
static void get_edges_flow(char *sql, pgr_edge_t **edges, size_t *totalTuples, bool ignore_id)
Definition: edges_input.c:406