<div>Hi Stephen</div>
<div>&nbsp;</div>
<div>&nbsp;thanks for the tip... I read the example and implements it with my data. </div>
<div>&nbsp;</div>
<div>
<div id="result_box" dir="ltr" style="TEXT-ALIGN: left">Now my problem is :how to rescue the data for instructions,distance,time etc? ..</div>
<div dir="ltr" style="TEXT-ALIGN: left">
<div id="result_box" dir="ltr" style="TEXT-ALIGN: left">how can I know whether to turn right or left?</div></div><br>RG.</div>
<div class="gmail_quote">2009/1/20 Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Valeria,<br><br>You should really look at the example provided with:<br><a href="http://pgrouting.postlbs.org/wiki/WorkshopFOSS4G2007" target="_blank">http://pgrouting.postlbs.org/wiki/WorkshopFOSS4G2007</a><br>
<br>This is what I started with and then made my own modifications. The above workshop should walk you through how to setup a pgRouting without my additional hacks which will only confuse you at the moment.<br><br>My dd_routing.php is a modified version of ax_routing.php that is included in the tutorial tarball.<br>
<br>You might also want to read some of these pages if you have not already:<br><a href="http://www.google.com/search?hl=en&amp;q=pgRouting&amp;btnG=Google+Search" target="_blank">http://www.google.com/search?hl=en&amp;q=pgRouting&amp;btnG=Google+Search</a><br>
<br>Best regards,<br>&nbsp;-Steve W<br><br>Valeria Muņoz wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">hi Stephen.. thank for the tips...<br>I have reviewed the code but can only see the dd.html. can you send me the dd_routing.php? .<br>&nbsp;please<br><br>thanks for everything<br></div>2009/1/19 Stephen Woodbridge &lt;<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> &lt;mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>&gt;&gt; 
<div class="Ih2E3d"><br><br>&nbsp; &nbsp;Valeria Muņoz wrote:<br><br>&nbsp; &nbsp; &nbsp; &nbsp;frank<br>&nbsp; &nbsp; &nbsp; &nbsp; thanks for the tips. &nbsp;I use prRouting &nbsp;and create the table<br>&nbsp; &nbsp; &nbsp; &nbsp;dijsktra_result. Now how can I implement with my mapfile? , how<br>
&nbsp; &nbsp; &nbsp; &nbsp;deliver the data .. have some sample code?<br><br>&nbsp; &nbsp; &nbsp; &nbsp;thanks for your help.<br><br>&nbsp; &nbsp; &nbsp; &nbsp;2009/1/19 Frank Warmerdam &lt;<a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br></div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;mailto:<a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a>&gt; &lt;mailto:<a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a> 
<div>
<div></div>
<div class="Wj3C7c"><br>&nbsp; &nbsp; &nbsp; &nbsp;&lt;mailto:<a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a>&gt;&gt;&gt;<br><br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Valeria Muņoz wrote:<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Hi<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I would like to implement the service &quot;optimum path<br>
&nbsp; &nbsp; &nbsp; &nbsp;between 2<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; points,&quot; can someone help me to be able to implement it?. The<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; general idea is that a user picks a point A and point B and a<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display on the map the best route to get from point A to B.<br>
<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Valeria,<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MapServer itself does not do route calculation. &nbsp;You might<br>&nbsp; &nbsp; &nbsp; &nbsp;find some<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; useful pointers on this page:<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://wiki.osgeo.org/wiki/OpenRouter" target="_blank">http://wiki.osgeo.org/wiki/OpenRouter</a><br>
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I think the pgRouting (built on postgres/postgis) is the best<br>&nbsp; &nbsp; &nbsp; &nbsp;bet for<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; integration with MapServer.<br><br><br>&nbsp; &nbsp;So you have various options depending on the client software you are<br>
&nbsp; &nbsp;using. So here are some ideas for you:<br><br>&nbsp; &nbsp;1) put the route into a results table with a unique id, and pass the<br>&nbsp; &nbsp;unique id back to the client where it can then request the route<br>&nbsp; &nbsp;image via a mapserver mapfile the connects to the postgis database<br>
&nbsp; &nbsp;and requests the layer be drawn with the unique id to select the<br>&nbsp; &nbsp;appropriate route.<br><br>&nbsp; &nbsp;2) make an ajax request to generate the route and return the<br>&nbsp; &nbsp;polyline as &nbsp;an xml or json object back to the client. The client<br>
&nbsp; &nbsp;then parses the result document and displays the route over the map.<br><br>&nbsp; &nbsp;3) if you use OpenLayers for the client then you can use it to help<br>&nbsp; &nbsp;you do 1) as an image, or 1) as a wfs layer, or 2) as a vector layer.<br>
<br>&nbsp; &nbsp;You can look at the source for my demo page<br>&nbsp; &nbsp;<a href="http://imaptools.com/leaddog/routing/dd.html" target="_blank">http://imaptools.com/leaddog/routing/dd.html</a> which does this with a<br>&nbsp; &nbsp;modified version of pgRouting (pgRouting does not return<br>
&nbsp; &nbsp;turn-by-turn directions), but you should be able to modify my code<br>&nbsp; &nbsp;to work with pgRouting. I wrote a simple php script to proxy the<br>&nbsp; &nbsp;route request into postgres and to format the results back to the<br>&nbsp; &nbsp;client.<br>
<br>&nbsp; &nbsp;Look this over and see how far you can get with this. If you get<br>&nbsp; &nbsp;stuck, ask and I&#39;m sure we can get you moving in the right direction.<br><br><br></div></div></blockquote><br></blockquote></div><br>