<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C616CD.1D224610">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="time"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="date"/>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>115</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:navy;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I believe there is ID miss up.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>If you run sample data step by step, there
are 3 <span class=GramE>tables</span> roads, <span class=SpellE>roads_edges</span>,
and roads_</span></font> <font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>vertices.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In table roads, <span class=SpellE>souce_id</span>
and <span class=SpellE>target_id</span> are different with <span class=SpellE>roads_edges</span>.
But the two ids (same node, but it has two different ID in table roads and <span
class=SpellE>roads_edges</span>) are connected by table roads_</span></font> <font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>vertices. In roads_</span></font> <font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>vertices,
id is the source/target used in roads-edges, and <span class=SpellE>gid</span>
is the id of same node used in <span class=GramE>tables</span> roads.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><span class=SpellE><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Shortest_path</span></font></span><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> asks for id from <span class=SpellE>roads_edges</span>. What you
passed <span class=GramE>are</span> node ID from Table roads. It is why program
cannot find the path.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Fay<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b>
cartoweb-users-bounces@lists.maptools.org
[mailto:cartoweb-users-bounces@lists.maptools.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Eggenschwiler Raphael<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><st1:date
Month="1" Day="10" Year="2006"><font size=2 face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma'>Tuesday, January 10, 2006</span></font></st1:date><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> </span></font><st1:time
Hour="9" Minute="10"><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>9:10 AM</span></font></st1:time><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b>
cartoweb-users@lists.maptools.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Cartoweb-users] dijkstra</span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hi everyone !<br>
<br>
I try to use this pgdijkstra on my data with :<br>
<br>
<b><span style='font-weight:bold'>SELECT arc_num_nod_src as
"source",arc_num as "id",arc_num_nod_des as
"target",arc_cost as "cost" FROM TAB_ARC; </span></b><br>
<br>
source id target cost<br>
0 6259
4769 0<br>
4769 6260 4770 0<br>
4770 6261 4771 0<br>
4771 6262 4772 0<br>
4772 6263 4773 0<br>
0 6264
4775 0 <br>
4775 6265 4776 0<br>
4776 6266 4777 0<br>
4777 6267 4778 0<br>
4778 6268 4779 0<br>
4779 6269 4780 0<br>
4780 6270 4781 0<br>
0 6271
4783 0<br>
4783 6272 4784 0 <br>
4784 6273 4785 0<br>
4785 6274 4786 0<br>
4786 6275 4787 0<br>
4787 6276 4788 0<br>
4788 6277 4789 0<br>
4789 6278 4790 0<br>
0 6279
4792 0<br>
4792 6280 4793 0 <br>
<br>
But when I try this one :<br>
<br>
<b><span style='font-weight:bold'>select * from shortest_path('SELECT
arc_num_nod_src as "source",arc_num as "id",arc_num_nod_des
as "target",arc_cost as "cost" FROM
TAB_ARC',4769,4770,false,false); </span></b><br>
<br>
I become this message :<br>
<br>
ERROR: Error computing path: Source vertex not found<br>
<br>
Can someone help me ??<o:p></o:p></span></font></p>
</div>
</body>
</html>