0

Having in hand the shape of the road and rural roads in the target region, followed the workshop documentation is available in pgrouting the site, I created the required fields, ran the pgr_createTopology, and other verification queries pgr_analyzeGraph and pgr_nodeNetwork, obtaining return "OK" in all of them.

QGIS using the BD Manager, to perform queries can not obtain routes from all nodes to all nodes, just a few return a possible route and only in segments almost completely straight.

I tried using the plugin pgRoutingLayer produced by Anita Graser and Ko Nagase, but the result is identical to direct SQL query.

I am using the pgr_djikstra to locate the route.

Does anyone have any idea what could be wrong? The following image with found and not found route.

Route found

Route not found

Franklin Januário
  • 125
  • 2
  • 2
  • 7
  • In the function pgr_djikstra you need the ids of start and end node. Are you using the correct ids? Please add the queries you used in the question – Tom-db Sep 11 '15 at 04:30
  • Thanks for you answer, i is using the plugin and i try this too: `SELECT seq, id1 AS node, id2 AS edge, the_geom, rcost FROM pgr_dijkstra(' SELECT gid AS id, source::integer, target::integer, length::double precision AS cost FROM rotas', 465, 535, false, false ) AS trajeto JOIN rotas trecho ON trajeto.id2 = trecho.gid;` – Franklin Januário Sep 11 '15 at 10:52
  • I tried two ways, entering the ID's from the id of rotas_vertices_pgr layer and using the source/target values from layer 'rotas'. Am I wrong in thinking that the id of the vertices are my origin / destination? – Franklin Januário Sep 11 '15 at 11:06
  • No, you are right. The ids in rotas_vertices_pgr must be used als source/target – Tom-db Sep 11 '15 at 11:34

0 Answers0