<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">Hi Vicky,<br>these are my first steps in pgrouting, and I’m sorry for some stupid question.</p>
<p style="margin:0px 0px 1.2em!important">On Thu, 17 May 2018 at 12:07, Vicky Vergara <a href="http://mailto:vicky@georepublic.de">vicky@georepublic.de</a> wrote:</p>
<p style="margin:0px 0px 1.2em!important"></p><div class="markdown-here-exclude"><p></p><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I dont know your data, but suppose<br><div style="font-family:arial,helvetica,sans-serif">id = 1, source = A, target = B, cost > 0, reverse_cost = -1 and that vertex A is not reachable<br></div><div style="font-family:arial,helvetica,sans-serif">then "manually" would be:<br></div><div style="font-family:arial,helvetica,sans-serif">UPDATE TABLE foo set source = target, target = source WHERE source IS IN (<set of unreachable vertices>)</div></div></blockquote><p></p></div><p style="margin:0px 0px 1.2em!important"></p>
<p style="margin:0px 0px 1.2em!important">I have created my network with <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">pgr_createTopology</code>.</p>
<p style="margin:0px 0px 1.2em!important">Now for one to many I must apply something like</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code class="hljs language-sql" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248) none repeat scroll 0% 0%"><span class="hljs-operator"><span class="hljs-keyword" style="color:rgb(51,51,51);font-weight:bold">SELECT</span> * <span class="hljs-keyword" style="color:rgb(51,51,51);font-weight:bold">FROM</span> pgr_dijkstra(
<span class="hljs-string" style="color:rgb(221,17,68)">'SELECT id, source, target, cost, reverse_cost FROM edge_table'</span>,
<span class="hljs-number" style="color:rgb(0,128,128)">2</span>, <span class="hljs-built_in" style="color:rgb(0,134,179)">ARRAY</span>[<span class="hljs-number" style="color:rgb(0,128,128)">3</span>,<span class="hljs-number" style="color:rgb(0,128,128)">5</span>],
<span class="hljs-literal">FALSE</span>
);</span>
</code></pre>
<p style="margin:0px 0px 1.2em!important">I do not have a <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">cost</code> and <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">reverse_cost</code> columns in my <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">edge_table</code> and than I have SQL error.<br>Do I must create them?</p>
<p style="margin:0px 0px 1.2em!important">Thank you</p>
<div title="MDH:PGRpdj5IaSBWaWNreSw8L2Rpdj48ZGl2PnRoZXNlIGFyZSBteSBmaXJzdCBzdGVwcyBpbiBwZ3Jv
dXRpbmcsIGFuZCBJJ20gc29ycnkgZm9yIHNvbWUgc3R1cGlkIHF1ZXN0aW9uLjxicj48L2Rpdj48
ZGl2PjwvZGl2Pjxicj48ZGl2IGNsYXNzPSJnbWFpbF9xdW90ZSI+PGRpdiBkaXI9Imx0ciI+T24g
VGh1LCAxNyBNYXkgMjAxOCBhdCAxMjowNywgVmlja3kgVmVyZ2FyY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2Pk5vdyBmb3Igb25lIHRvIG1hbnkgSSBtdXN0IGFwcGx5IHNvbWV0aGluZyBs
aWtlPC9kaXY+PGRpdj48YnI+PC9kaXY+PGRpdj5gYGBzcWw8L2Rpdj48ZGl2PlNFTEVDVCAqIEZS
T00gcGdyX2RpamtzdHJhKDxicj4mbmJzcDsmbmJzcDsmbmJzcDsgJ1NFTEVDVCBpZCwgc291cmNl
LCB0YXJnZXQsIGNvc3QsIHJldmVyc2VfY29zdCZuYnNwOyBGUk9NIGVkZ2VfdGFibGUnLDxicj4m
bmJzcDsmbmJzcDsmbmJzcDsgMiwgQVJSQVlbMyw1XSw8YnI+Jm5ic3A7Jm5ic3A7Jm5ic3A7IEZB
TFNFPGJyPik7PC9kaXY+PGRpdj5gYGA8L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2PkkgZG8gbm90
IGhhdmUgYSBgY29zdGAgYW5kIGAKcmV2ZXJzZV9jb3N0YCBjb2x1bW5zIGluIG15IGBlZGdlX3Rh
YmxlYCBhbmQgdGhhbiBJIGhhdmUgU1FMIGVycm9yLjwvZGl2PjxkaXY+RG8gSSBtdXN0IGNyZWF0
ZSB0aGVtPzwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+VGhhbmsgeW91PGJyPjwvZGl2PjxkaXY+
PGJyPjwvZGl2PjxkaXY+Jm5ic3A7PC9kaXY+PC9kaXY+PGJyPg==" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-size:small">___________________</span><br></div><div dir="ltr"><span style="font-size:small"><br></span></div><div dir="ltr">Andrea Borruso<br>
website: <a href="https://medium.com/tantotanto" target="_blank">https://medium.com/tantotanto</a><br>38° 7' 48" N, 13° 21' 9" E, EPSG:4326<br><span style="font-size:small">___________________</span><br>
<br>
"cercare e saper riconoscere chi e cosa,<br>
in mezzo all’inferno, non è inferno, <br>
e farlo durare, e dargli spazio"<br>
<br>
Italo Calvino<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>