I am trying to use pgRouting in order to find the shortest route between two points. I realized that pgr_dijkstra() function is not able to find the route when the two points are far from each other or when they are not very straight. However, when I select the two points in a neighbourhood, it can give me the shortest path.
This is the roads table (edges):
and this is the table of nodes that pgrouting created with the ending of "_vertices_pgr":
Does any one know what is the problem? I used this query:
select pgr_dijkstra('select id , source, target, st_length(geom) as cost FROM q_roads_noded', 10237, 10551)
q_roads is the table of roads (edges)
The network is like this: I tried to find the shortest path between points with id: 10237 and 10551. But the function returned nothing!!!