vidhan13j07 / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
http://www.pgrouting.org
GNU General Public License v2.0
0 stars 0 forks source link

Postgresql table example for LineGraph #18

Closed vidhan13j07 closed 7 years ago

vidhan13j07 commented 7 years ago

(Original Graph)Edges input to the line Graph.(Basically vertices of LineGraph)

Id Source Target Cost Reverse_cost
1 1 2 1 1
2 2 3 -1 1
3 3 4 -1 1
4 2 5 1 1
5 3 6 1 -1
6 7 8 1 1
7 8 5 1 1
8 5 6 1 1
9 6 9 1 1
10 5 10 1 1
11 6 11 1 -1
12 10 11 1 -1
13 11 12 1 -1
14 10 13 1 1
15 9 12 1 1
16 4 9 1 1
17 14 15 1 1
18 16 17 1 1

Output from the line Graph

seq source target cost reverse_cost
1 -2 -1 1 -1
2 -4 -1 1 1
3 -2 4 1 -1
4 -3 -2 1 -1
5 -3 5 1 -1
6 -16 -3 1 -1
7 7 -4 1 1
8 -8 -4 1 1
9 -10 -4 1 1
10 -8 -7 1 1
11 -10 -7 1 1
12 -10 8 1 1
13 5 -8 1 -1
14 -9 -8 1 1
15 5 9 1 -1
16 5 11 1 -1
17 8 11 1 -1
18 -9 11 1 -1
19 -7 -6 1 1
20 -15 -9 1 1
21 16 -9 1 1
22 16 15 1 1
23 -14 -10 1 1
24 10 12 1 -1
25 -14 12 1 -1
26 11 13 1 -1
27 12 13 1 -1
28 13 -15 1 -1