[pgrouting-users] Build the "right" direction in a network, from a fixed starting point

andy aborruso at gmail.com
Thu May 17 05:25:49 PDT 2018

Hi Vicky,
these are my first steps in pgrouting, and I’m sorry for some stupid

On Thu, 17 May 2018 at 12:07, Vicky Vergara vicky at georepublic.de
<http://mailto:vicky@georepublic.de> wrote:

I dont know your data, but suppose
> id = 1, source = A, target = B, cost > 0, reverse_cost = -1 and that
> vertex A is not reachable
> then "manually" would be:
> UPDATE TABLE foo set source = target, target = source WHERE source IS IN
> (<set of unreachable vertices>)
I have created my network with pgr_createTopology.

Now for one to many I must apply something like

SELECT * FROM pgr_dijkstra(
    'SELECT id, source, target, cost, reverse_cost  FROM edge_table',
    2, ARRAY[3,5],

I do not have a cost and reverse_cost columns in my edge_table and than I
have SQL error.
Do I must create them?

Thank you

Andrea Borruso
website: https://medium.com/tantotanto
38° 7' 48" N, 13° 21' 9" E, EPSG:4326

"cercare e saper riconoscere chi e cosa,
 in mezzo all’inferno, non è inferno,
e farlo durare, e dargli spazio"

Italo Calvino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20180517/634672a8/attachment.html>

More information about the Pgrouting-users mailing list