data (#23) - without GIS (#330) - Message List
Hi all. I was wondering if there is somebody who could give me a hint with my issue here. I need to calculate the shortes way between to point which are located in two different countries. If have the distances between lets say budapest to various border-points situated at the border of hungary. I have also all the distances of its neighbouring countries from border to border. My destination is lets say paris. So the shortest path would possibly be, budapest to the austrian border to german border to french border to paris. I have all this distances but no coordinates. I there a way to solve this problem by using one of the algorithms?
-
Message #1370
Yes, you can.
The Dijkstra doesn't need coordinates. It only cares about "costs" between two points. In your case the distance is your cost attribute.
But what you need to know is how your points are connected, so you need a network with relations between points. If you have this, you can use pgRouting.
daniel01/30/10 03:12:20 (10 months ago)-
Message #1371
Thanks daniel.. Let's see if i am able to get it to work..
williamwallace01/30/10 03:43:14 (10 months ago)-
Message #1372
If something doesn't work, post your qestion here or in the mailing list.
daniel01/30/10 03:45:37 (10 months ago)-
Message #1374
Thank You very much.. it works! the only thing i have to figure out is get the right order of the results since there is no output which gives me the right sequence... there are only vertex_id, edge_id and cost and the various steps are not in the right order...
williamwallace01/31/10 03:30:56 (10 months ago)-
Message #1375
Do you use the trunk version of SVN? Or a Windows binary?
As far as I remember, there should be also an "id" attribute you can order by, which it does if you use the available wrapper functions. And I guess you won't, because they all contain geometry attribute, which you don't have.
(I'm not sure the 'id' attribute is in 1.03)daniel01/31/10 07:51:51 (10 months ago)
-
-
-
-