PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
points_input.h
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 File: points_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_POINTS_INPUT_H_
26 #define SRC_COMMON_SRC_POINTS_INPUT_H_
27 #pragma once
28 
29 #include "./pgr_types.h"
30 
43 void pgr_get_points(
44  char *points_sql,
45  Point_on_edge_t **points,
46  size_t *total_points);
47 
48 
49 /* ******************** FOR USERS DOCUMENTATION
50 
51 points_sql_start
52 
53 Description of the Points SQL query
54 ...............................................................................
55 
56 :points_sql: an SQL query, which should return a set of rows with the following columns:
57 
58 ============ ================= =================================================
59 Column Type Description
60 ============ ================= =================================================
61 **pid** ``ANY-INTEGER`` (optional) Identifier of the point.
62  - If column present, it can not be NULL.
63  - If column not present, a sequential identifier will be given automatically.
64 
65 **edge_id** ``ANY-INTEGER`` Identifier of the "closest" edge to the point.
66 **fraction** ``ANY-NUMERICAL`` Value in <0,1> that indicates the relative postition from the first end point of the edge.
67 **side** ``CHAR`` (optional) Value in ['b', 'r', 'l', NULL] indicating if the point is:
68  - In the right, left of the edge or
69  - If it doesn't matter with 'b' or NULL.
70  - If column not present 'b' is considered.
71 ============ ================= =================================================
72 
73 Where:
74 
75 :ANY-INTEGER: smallint, int, bigint
76 :ANY-NUMERICAL: smallint, int, bigint, real, float
77 
78 points_sql_end
79 
80 */
81 
82 
83 #endif // SRC_COMMON_SRC_POINTS_INPUT_H_
void pgr_get_points(char *points_sql, Point_on_edge_t **points, size_t *total_points)
pgr_get_points
Definition: points_input.c:62