Hello Pedro,<br><br>Thank you very much for your mail. Yes, I have created two dataset (a) node (b) edge as you said. I was looking at the sample data given in PostLBS which has something like<br><br>CREATE TABLE "kanagawa" (gid serial PRIMARY KEY,
<br>"length" numeric,<br>"x1" numeric,<br>"y1" numeric,<br>"x2" numeric,<br>"y2" numeric,<br>"source" int8,<br>"target" int8);<br>SELECT AddGeometryColumn('','kanagawa','the_geom','-1','MULTILINESTRING',2);
<br>COPY "kanagawa" ("length","x1","y1","x2","y2","source","target",the_geom) FROM stdin;<br><br>In the edge data from OpenJump we have start and end nodes which will be source and target. Can you please point me out about how to get the rest of the columns. Which are the columns need to transfered from nodes layer and can I just use length(the_geom) to get the length column ?.
<br><br>Thanks<br>Green.<br><br><div><span class="gmail_quote">On 25/04/07, <b class="gmail_sendername">Pedro Doria Meunier</b> <<a href="mailto:pdoria@netmadeira.com">pdoria@netmadeira.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="PT">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hey Green,</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">I have fiddled with this some time ago... (and I also was left
scratching my head for a while :] )</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Here's what I've concocted:</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Using OpenJump:</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">There a tool called 'Planar Graph' under
tools->analysis</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">(uncheck create faces)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">You're give two layers </span><span style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);" lang="EN-US">à</span><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">
 one with all the nodes (and their IDs) and the other with the
edges.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">The latter gives you the start and end nodes for each segment…</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Since pgrouting works by setting turning costs for each node…
You just have to add another field to this layer and set each node's
turning cost… ;-)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">(you could, of course, transfer the attributes from the original
layer (such as labels, names, etc…) to this layer…)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">From this point on it's a matter of deciding what you want
to do under a programmatical point of view…</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">So you see you don't have to go nuts with all that unfinished
topology support… ;-)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">HTH,</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US">Pedro Doria Meunier</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US">
<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">postgis-users-bounces@postgis.refractions.net</a>
[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">postgis-users-bounces@postgis.refractions.net</a>] <b>On Behalf Of </b>Green<br>

<b>Sent:</b> quarta-feira, 25 de Abril de 2007 11:15<br>
<b>To:</b> <a href="mailto:postgis-users@postgis.refractions.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">postgis-users@postgis.refractions.net</a><br>
<b>Subject:</b> [postgis-users] Help with pgRouting & PostGIS</span></p>

</div><div><span class="e" id="q_112291bc0e05e438_1">

<p><span lang="EN-US"> </span></p>

<p>Hi,<br>
<br>
I have been using PostGIS for a while and it works great for my requirement. I
have roads & streets as shapefile and now, I wanted to a find the shortest
route between locations.<br>
<br>
I found pgRouting during the search process. There they talk about topology.
They have suggested to use 3 tools for creating data for pgRouting and I don't
have access to 2 of them. The one that is familiar to me is PostGIS. I intalled
the topology functions and I am struck without any direction. Now what ? <br>
<br>
I request any one of you help me and I would greatly appreciate.<br>
<br>
I have shapefiles of roads and how do I create data for pgRouting ?<br>
<br>
Thanks<br>
Green</p>

</span></div></div>

</div>


<br>_______________________________________________<br>postgis-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br>
</blockquote></div><br>