Ticket #159 (closed task: invalid)

Opened 17 months ago

Last modified 17 months ago

shortest path result not in order.

Reported by: shafeer Owned by: somebody
Priority: major Milestone:
Component: pgRouting package Version:
Keywords: Cc:

Description

SELECT rd_network.* FROM my_road rd_network, (SELECT edge_id as gid FROM shortest_path('SELECT gid AS id, source, target,length as cost,length AS reverse_cost FROM my_road',1878,1490, false, false) ) as rt WHERE rt.gid=rd_network.gid;

I am trying to execute this query in 2 different Server one is of red hat and another of centOS. But I ends up in two different output(I mean the order) while executing in both. But my inner Query output was same for both the server. (i.e) SELECT edge_id as gid FROM shortest_path('SELECT gid AS id, source, target,length as cost,length AS reverse_cost FROM my_road',1878,1490, false, false)

Change History

Changed 17 months ago by anton

  • status changed from new to closed
  • resolution set to invalid

That's because you link your search result with my_road rd_network table which returns you rows in it's natural order (the way they were inserted to the table).

To order shortest path search results please try to use wrapper functions - they allow you to order your result by id field.

Note: See TracTickets for help on using tickets.