Skip to main content
fixed table display
Source Link
Yendor
  • 313
  • 1
  • 7

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_idsourcetargetcostgeom
20834616739850564148.55814507696616""
11818616739716739818.917451445786348""
118185167397978885.577629837679091""
58802978889788987.04193787193802""
1181879788916739995.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

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 | "" |

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

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_idsourcetargetcostgeom
20834616739850564148.55814507696616""
11818616739716739818.917451445786348""
118185167397978885.577629837679091""
58802978889788987.04193787193802""
1181879788916739995.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

added 8 characters in body
Source Link
geozelot
  • 30.9k
  • 4
  • 34
  • 57

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

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 | "" |

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

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 | "" |

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

deleted 49 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

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 | "" |

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

any help would be greatly appreciated, thanks

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 | "" |

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

any help would be greatly appreciated, thanks

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 | "" |

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

Source Link
Yendor
  • 313
  • 1
  • 7
Loading