PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
edges_input.h
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: edges_input.h
3 
4 Copyright (c) 2015 Celia Virginia Vergara Castillo
5 vicky_vergara@hotmail.com
6 
7 ------
8 
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 
23 ********************************************************************PGR-GNU*/
24 
25 #ifndef SRC_COMMON_SRC_EDGES_INPUT_H_
26 #define SRC_COMMON_SRC_EDGES_INPUT_H_
27 #pragma once
28 
29 #include "./pgr_types.h"
30 
31 
46  char *edges_sql,
47  pgr_edge_t **edges,
48  size_t *total_edges);
49 
50 
51 
64 void pgr_get_edges(
65  char *edges_sql,
66  pgr_edge_t **edges,
67  size_t *total_edges);
69  char *edges_sql,
70  pgr_edge_t **edges,
71  size_t *total_edges);
72 
73 
74 
87 void pgr_get_edges_xy(
88  char *edges_sql,
90  size_t *total_edges);
91 
113  char *edges_sql,
115  size_t *total_edges);
116 
117 
132 void pgr_get_flow_edges(
133  char *sql,
134  pgr_edge_t **edges,
135  size_t *total_edges);
136 
150  char *sql,
152  size_t *total_edges);
153 
154 
155 
156 /* **************** FOR USERS DOCUMENTATION
157 basic_edges_sql_start
158 
159 Description of the edges_sql query
160 ...............................................................................
161 
162 :edges_sql: an SQL query, which should return a set of rows with the following columns:
163 
164 ================ =================== ======== =================================================
165 Column Type Default Description
166 ================ =================== ======== =================================================
167 **id** ``ANY-INTEGER`` Identifier of the edge.
168 **source** ``ANY-INTEGER`` Identifier of the first end point vertex of the edge.
169 **target** ``ANY-INTEGER`` Identifier of the second end point vertex of the edge.
170 **cost** ``ANY-NUMERICAL`` Weight of the edge `(source, target)`
171  - When negative: edge `(source, target)` does not exist, therefore it's not part of the graph.
172 **reverse_cost** ``ANY-NUMERICAL`` -1 Weight of the edge `(target, source)`,
173  - When negative: edge `(target, source)` does not exist, therefore it's not part of the graph.
174 ================ =================== ======== =================================================
175 
176 Where:
177 
178 :ANY-INTEGER: SMALLINT, INTEGER, BIGINT
179 :ANY-NUMERICAL: SMALLINT, INTEGER, BIGINT, REAL, FLOAT
180 
181 basic_edges_sql_end
182 
183 no_id_edges_sql_start
184 
185 Description of the edges_sql query
186 ...............................................................................
187 
188 :edges_sql: an SQL query, which should return a set of rows with the following columns:
189 
190 ================ =================== ======== =================================================
191 Column Type Default Description
192 ================ =================== ======== =================================================
193 **source** ``ANY-INTEGER`` Identifier of the first end point vertex of the edge.
194 **target** ``ANY-INTEGER`` Identifier of the second end point vertex of the edge.
195 **cost** ``ANY-NUMERICAL`` Weight of the edge `(source, target)`
196  * When negative: edge `(source, target)` does not exist, therefore it's not part of the graph.
197 **reverse_cost** ``ANY-NUMERICAL`` -1 Weight of the edge `(target, source)`,
198  - When negative: edge `(target, source)` does not exist, therefore it's not part of the graph.
199 ================ =================== ======== =================================================
200 
201 Where:
202 
203 :ANY-INTEGER: SMALLINT, INTEGER, BIGINT
204 :ANY-NUMERICAL: SMALLINT, INTEGER, BIGINT, REAL, FLOAT
205 
206 no_id_edges_sql_end
207 
208 
209 xy_edges_sql_start
210 
211 Description of the edges_sql query
212 ...............................................................................
213 
214 :edges_sql: an SQL query, which should return a set of rows with the following columns:
215 
216 ================ =================== ======== =================================================
217 Column Type Default Description
218 ================ =================== ======== =================================================
219 **id** ``ANY-INTEGER`` Identifier of the edge.
220 **source** ``ANY-INTEGER`` Identifier of the first end point vertex of the edge.
221 **target** ``ANY-INTEGER`` Identifier of the second end point vertex of the edge.
222 **cost** ``ANY-NUMERICAL`` Weight of the edge `(source, target)`
223  - When negative: edge `(source, target)` does not exist, therefore it's not part of the graph.
224 **reverse_cost** ``ANY-NUMERICAL`` -1 Weight of the edge `(target, source)`,
225  - When negative: edge `(target, source)` does not exist, therefore it's not part of the graph.
226 
227 **x1** ``ANY-NUMERICAL`` X coordinate of `source` vertex.
228 **y1** ``ANY-NUMERICAL`` Y coordinate of `source` vertex.
229 **x2** ``ANY-NUMERICAL`` X coordinate of `target` vertex.
230 **y2** ``ANY-NUMERICAL`` Y coordinate of `target` vertex.
231 ================ =================== ======== =================================================
232 
233 Where:
234 
235 :ANY-INTEGER: SMALLINT, INTEGER, BIGINT
236 :ANY-NUMERICAL: SMALLINT, INTEGER, BIGINT, REAL, FLOAT
237 
238 xy_edges_sql_end
239 */
240 
241 #endif // SRC_COMMON_SRC_EDGES_INPUT_H_
void pgr_get_edges_reversed(char *edges_sql, pgr_edge_t **edges, size_t *total_edges)
Definition: edges_input.c:550
void pgr_get_edges(char *edges_sql, pgr_edge_t **edges, size_t *total_edges)
basic edge_sql
Definition: edges_input.c:539
void pgr_get_edges_xy(char *edges_sql, Pgr_edge_xy_t **edges, size_t *total_edges)
Edges with x, y vertices values.
Definition: edges_input.c:572
void pgr_get_edges_no_id(char *edges_sql, pgr_edge_t **edges, size_t *total_edges)
edges_sql without id parameter
Definition: edges_input.c:561
void pgr_get_basic_edges(char *sql, pgr_basic_edge_t **edges, size_t *total_edges)
read basic edges
Definition: edges_input.c:594
void pgr_get_flow_edges(char *sql, pgr_edge_t **edges, size_t *total_edges)
read edges for flow
Definition: edges_input.c:529
edge_astar_t * edges
Definition: BDATester.cpp:46
void pgr_get_edges_xy_reversed(char *edges_sql, Pgr_edge_xy_t **edges, size_t *total_edges)
for many to 1 on aStar
Definition: edges_input.c:585