<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@01C61753.BB482630">
<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;
        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.EmailStyle18
        {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'>There are 2 solutions which can solve your
problem.<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>&nbsp;</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'>I still use my table name, 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'>1. Go to roads_ vertices table, <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'><span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span><span class=GramE>select</span>
id from <span class=SpellE>roads_vertices</span> where <span
style='mso-spacerun:yes'>&nbsp;</span><span class=SpellE>geom_id</span>=</span></font><b><span
style='font-weight:bold'>4769 or </span></b><span class=SpellE><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>geom_id</span></font></span><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>=</span></font><b><span
style='font-weight:bold'> 4770;</span></b><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'><span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>It will return your two
rows. <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'><span
style='mso-spacerun:yes'>&nbsp;&nbsp;&nbsp; </span>Use returned two ids to replace
4769 and 4770 in your command.<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>&nbsp;</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'>2. Instead of using <span class=SpellE>shortest_path</span>
function, use <span class=SpellE>shortest_path</span></span></font> <font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>_<span class=SpellE>as_geometry</span>. This function takes node id
from Table roads. So 4769 and 4770 will works. Of cause, you need to make
change to satisfy <span class=SpellE>shortest_path</span></span></font> <font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>_<span class=SpellE>as_geometry</span> signature. And the return is
different. As function name indicates, it will return line geometry with edge
ID.<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>&nbsp;</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 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>Fay Du<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><st1:date
Month="1" Day="11" Year="2006"><font size=2 face=Tahoma><span style='font-size:
 10.0pt;font-family:Tahoma'>Wednesday, January 11, 2006</span></font></st1:date><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> </span></font><st1:time
Hour="16" Minute="36"><font size=2 face=Tahoma><span style='font-size:10.0pt;
 font-family:Tahoma'>4:36 PM</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> 'Eggenschwiler Raphael'<br>
<b><span style='font-weight:bold'>Cc:</span></b>
cartoweb-users@lists.maptools.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [Cartoweb-users]
dijkstra - miss up node ID</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>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><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 style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><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 tables roads, roads_edges, 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 style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>In table roads, souce_id
and target_id are different with roads_edges. But the two ids (same node, but
it has two different ID in table roads and roads_edges) 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 gid is
the id of same node used in tables roads.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Shortest_path asks for id
from roads_edges. What you passed are node ID from Table roads. It is why
program cannot find the path.<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><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 style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:1.0in'><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><o:p></o:p></p>

<p class=MsoNormal style='margin-left:1.0in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:1.0in'><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
&quot;source&quot;,arc_num as &quot;id&quot;,arc_num_nod_des as
&quot;target&quot;,arc_cost as &quot;cost&quot; FROM TAB_ARC; </span></b><br>
<br>
source&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp; target&nbsp;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bsp;&nbsp; 0 <br>
4784&nbsp;&nbsp;&nbsp; 6273&nbsp;&nbsp;&nbsp; 4785&nbsp;&nbsp;&nbsp; 0<br>
4785&nbsp;&nbsp;&nbsp; 6274&nbsp;&nbsp;&nbsp; 4786&nbsp;&nbsp;&nbsp; 0<br>
4786&nbsp;&nbsp;&nbsp; 6275&nbsp;&nbsp;&nbsp; 4787&nbsp;&nbsp;&nbsp; 0<br>
4787&nbsp;&nbsp;&nbsp; 6276&nbsp;&nbsp;&nbsp; 4788&nbsp;&nbsp;&nbsp; 0<br>
4788&nbsp;&nbsp;&nbsp; 6277&nbsp;&nbsp;&nbsp; 4789&nbsp;&nbsp;&nbsp; 0<br>
4789&nbsp;&nbsp;&nbsp; 6278&nbsp;&nbsp;&nbsp; 4790&nbsp;&nbsp;&nbsp; 0<br>
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6279&nbsp;&nbsp;&nbsp;
4792&nbsp;&nbsp;&nbsp; 0<br>
4792&nbsp;&nbsp;&nbsp; 6280&nbsp;&nbsp;&nbsp; 4793&nbsp;&nbsp;&nbsp; 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 &quot;source&quot;,arc_num as &quot;id&quot;,arc_num_nod_des
as &quot;target&quot;,arc_cost as &quot;cost&quot; FROM
TAB_ARC',4769,4770,false,false); </span></b><br>
<br>
I become this message :<br>
<br>
ERROR:&nbsp; Error computing path: Source vertex not found<br>
<br>
Can someone help me ??<o:p></o:p></span></font></p>

</div>

</body>

</html>