Hi,<div><br></div><div>Yes, you need a source and target attribute because they provide the network topology information for the routing algorithm.</div><div>I recommend you to read the pgRouting workshop chapters starting from this one: <a href="http://workshop.pgrouting.org/chapters/topology.html">http://workshop.pgrouting.org/chapters/topology.html</a></div>
<div><br></div><div>The name of the attribute (column) can have a different name in your table, but then you need to use "fromnode AS source" and "tonode AS target" alias, because the shortest path function requires the attribute names.</div>
<div>You can also create a table VIEW that contains the attribute names as they are required by the shortest path function.</div><div><br></div><div>Daniel</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">
On Tue, Jun 12, 2012 at 2:17 PM, Annu Anurag <span dir="ltr"><<a href="mailto:i.skidoosh@gmail.com" target="_blank">i.skidoosh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have copied the example from the default example given by pgrouting in its documentation. Actually, there is no such column as 'source' or 'target'. I was under the impression that these are generic terms to be supplied to the query. Do they have to be columns? If that's true, the query will have to have a table that has a 'fromnode' and 'tonode'. I'm not quite sure. This is my first attempt at pgrouting. I'm still trying to understand its working. Please guide me with the basics a bit as the documentation for pgrouting isn't particularly very good. Thanks!<br>
<br>I'm attaching a copy of the dBase file for the shapefile I'm trying to operate on.. Please have a look. I just need to route from one point to another. There's no source and target column though.<br>
<br>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>
Web: <a href="http://georepublic.de/" style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span><br>
</div>