pgr_dijkstra function not finding node that appears in ways table

المشرف العام

Administrator
طاقم الإدارة
I am having a problem with pgr_dijkstra algorithm not finding some of the node vertices in my table. I have a large dataset of survey travel diaries and am trying to determine their shortest paths between each place they visit. I linked each place visited to the closest node in my OSM network using the ways_vertices_pgr table. I can find the nodes that are returning a blank shortest route in either the source or target column of the ways table (my edge table) but for some reason pgr_dijkstra is not finding the node when I call the function for about half of my routes. Do I need to do something to tell the algorithm to look in both source and target columns of the ways table? Here is my query that fills in the routes, which worked for about half of my routes. I should mention that the prg_dijkstra function I use here is the prg_dijkstra wrapper function given on the workshop website on the pgrouting homepage. I have tried with the full function as well and it doesn't seem to make a difference. I have also done pgr_analyzegraph and the network topology returns OK.

update analysis.routing set routeline2 = (select st_multi(st_union(pgr.geom)) from (select * from pgr_dijkstra('ways',analysis.routing.source,analysis.routing.target)) as pgr) ; Do I need to do ST_Reverse or some other transformation to get the function to find the node? Any help would be greatly appreciated.



أكثر...
 
أعلى