What I'm trying to do is traverse a known path in a given direction for a given distance.
What I have done so far is build a temp table of the path in the order I want to travel and it looks like:
| edge_id | source | target | cost | geom |
|---------|---------|---------|------|------- |
| 208346 | 167398 | 50564 | 148.55814507696616 | "" |
| 118186 | 167397 | 167398 | 18.917451445786348 | "" |
| 118185 | 167397 | 97888 | 5.577629837679091 | "" |
| 58802 | 97888 | 97889 | 87.04193787193802 | "" |
| 118187 | 97889 | 167399 | 95.53741276977404 | "" |
edge_id | source | target | cost | geom |
---|---|---|---|---|
208346 | 167398 | 50564 | 148.55814507696616 | "" |
118186 | 167397 | 167398 | 18.917451445786348 | "" |
118185 | 167397 | 97888 | 5.577629837679091 | "" |
58802 | 97888 | 97889 | 87.04193787193802 | "" |
118187 | 97889 | 167399 | 95.53741276977404 | "" |
now I believe I should add a dir
and reverse_cost
columns and set value to something.
I'm assuming I can set the values of dir
and reverse_cost
based on the source
and target
columns, do I also need to change the value of cost
maybe invert?
I can not figure out how to wright an update query to add the correct info into the table to then be able to run pgr_withPointsDD