PGROUTING  2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
get_new_queries.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char estimate_drivingSide (char driving_side)
 
void get_new_queries (char *edges_sql, char *points_sql, char **edges_of_points_query, char **edges_no_points_query)
 

Function Documentation

char estimate_drivingSide ( char  driving_side)

Definition at line 35 of file get_new_queries.cpp.

Referenced by process().

35  {
36  char d_side = static_cast<char>(tolower(driving_side));
37  if (!((d_side == 'r')
38  || (d_side == 'l'))) {
39  d_side = 'b';
40  }
41  return d_side;
42 }

Here is the caller graph for this function:

void get_new_queries ( char *  edges_sql,
char *  points_sql,
char **  edges_of_points_query,
char **  edges_no_points_query 
)

Definition at line 45 of file get_new_queries.cpp.

Referenced by process().

49  {
50  std::ostringstream edges_of_points_sql;
51  std::ostringstream edges_no_points_sql;
52 
53  edges_of_points_sql << "WITH "
54  << " edges AS (" << edges_sql << "), "
55  << " points AS (" << points_sql << ")"
56  << " SELECT DISTINCT edges.* FROM edges JOIN points ON (id = edge_id)";
57  *edges_of_points_query = strdup(edges_of_points_sql.str().c_str());
58 
59  edges_no_points_sql << "WITH "
60  << " edges AS (" << edges_sql << "), "
61  << " points AS (" << points_sql << ")"
62  << " SELECT edges.*"
63  << " FROM edges"
64  << " WHERE NOT EXISTS (SELECT edge_id FROM points WHERE id = edge_id)";
65  *edges_no_points_query = strdup(edges_no_points_sql.str().c_str());
66 }

Here is the caller graph for this function: