If you want to write some web application, then you can use OpenLayers/GeoExt for example.<div>See the pgRouting workshop: <a href="http://workshop.pgrouting.org/">http://workshop.pgrouting.org/</a> (there will be an updated on released with FOSS4G in September).</div>
<div>Instead of PHP (or some other server side coding) you can also use Geoserver "SQL views": <a href="http://docs.geoserver.org/stable/en/user/data/sqlview.html">http://docs.geoserver.org/stable/en/user/data/sqlview.html</a></div>
<div>It's a new feature of Geoserver andvery convenient.</div><div><br></div><div>If you only want to check results you can use QGIS:</div><div><div><ul><li>Create a database connection and add the "ways" table as a background layer.</li>
<li>Add another layer of the "ways" table but select Build query before adding it.</li><li>Type for example<font face="'courier new', monospace"> "gid" IN ( SELECT gid FROM dijkstra_sp('ways',5700,6733))</font> into the SQL where clause field.</li>
</ul><div>Hope that helps.</div><div><br></div><div>Daniel</div></div></div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Aug 23, 2011 at 1:01 AM, Jules Kouadio <span dir="ltr"><<a href="mailto:sekedoua@gmail.com">sekedoua@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thank you so mutch ! All is running !<br>I see that my request was not correctly wrotte .<br>How can i now visualyse all this result on a map (on a web map server).<br>
Do you have a good tutorial, step by step, whith all details ?<br>
<br>Thanks again<br><br><br><div class="gmail_quote"><div><div></div><div class="h5">2011/8/22 Daniel Kastl <span dir="ltr"><<a href="mailto:daniel@georepublic.de" target="_blank">daniel@georepublic.de</a>></span><br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5">
Hi Jules,<div><br></div><div>Here are working examples of your queries:</div><div><br></div><div><div><div><font face="'courier new', monospace">SELECT * FROM shortest_path_astar(</font></div></div><div>
<font face="'courier new', monospace"> 'SELECT gid AS id,source::integer,target::integer,length::double precision AS cost,x1,y1,x2,y2 FROM ways',</font></div>
<div><font face="'courier new', monospace"> 300,400,false,false</font></div><div><font face="'courier new', monospace">);</font></div><div><br></div><div><font face="'courier new', monospace">SELECT * FROM driving_distance(</font></div>
<div><font face="'courier new', monospace"> 'SELECT gid AS id,source,target,length::double precision AS cost FROM ways',</font></div><div><font face="'courier new', monospace"> 300,1.0,false,false</font></div>
<div><font face="'courier new', monospace">);</font></div><div><br></div><div><font face="'courier new', monospace">SELECT * FROM tsp(</font></div><div><font face="'courier new', monospace"> 'SELECT DISTINCT source AS source_id,x1::double precision as x,y1::double precision AS y FROM ways WHERE source IN(91,35,75,504,254)',</font></div>
<div><font face="'courier new', monospace"> '91,35,75,504,254',75</font></div><div><font face="'courier new', monospace">);</font></div></div><div><br></div><div>Best regards,</div><div>Daniel</div>
<font color="#888888">
</font><div><div><div></div><div><br><br><div class="gmail_quote">On Tue, Aug 23, 2011 at 12:08 AM, Jules Kouadio <span dir="ltr"><<a href="mailto:sekedoua@gmail.com" target="_blank">sekedoua@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
This is all my databse (routing).<br>Please look at this.<div><div></div><div><br><br><br><div class="gmail_quote">2011/8/22 Jules Kouadio <span dir="ltr"><<a href="mailto:sekedoua@gmail.com" target="_blank">sekedoua@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Hello Danniel. Thanks again for your support. I progress but i have so much to learn. <br><br>why this error for this 3 request ?<b><br><br>SELECT * from driving_distance('select gid as id,source,target,length::double precision as cost from ways',22777838,0.01);</b><br>
<br clear="all"><span lang="en"><span>ERROR:</span> <span>function</span> <span>driving_distance</span> <span>(</span><span>"unknown"</span><span>, integer</span><span>, numeric</span><span>) does not exist</span><br>
<span>HINT:</span> <span>No function</span> <span>matches the</span> <span>given name</span> <span>and</span> <span>argument types</span><span>.</span> <span>You need to add</span> <span>explicit</span> <span>type</span> <span>conversions</span><span>.<br>
<br><b>SELECT * FROM shortest_path_astar('select gid as id,source::int4,target::int4,reverse_cost::double precision as reverse_cost,x1,y1,x2,y2 from ways',22,150,false,false);</b><br>ERREUR: Error, query must return columns 'id', 'source', 'target' and 'cost'<br>
<br><br><i><b>SELECT * from tsp('select distinct source as source_id,x1::double precision as x,y1::double precision as y from ways where source in(91,35,75,504,254)','91,35,75,504,254',353);</b></i><br><br>
</span></span><span lang="en"><span>WARNING:</span> <span>stop</span> <span>the connection</span> <span>because of</span> <span>crash</span> <span>of another</span> <span>server process</span><br>
<span>DETAIL:</span> <span>The</span> <span>postmaster</span> <span>has commanded</span> <span>this</span> <span>server process</span> <span>to cancel the transaction</span><br>
<span>Current</span> <span>and leave</span> <span>because another process</span> <span>server</span> <span>left</span> <span>abnormally</span><br> <span>and there is</span> <span>probably</span> <span>corrupted</span> <span>shared memory</span><span>.</span><br>
<span>TIP:</span> <span>In a moment</span> <span>you should be able</span> <span>to reconnect to</span> <span>the base of</span><br> <span>data and</span> <span>restart</span> <span>your order.</span><br>
<span>the server connection</span> <span>was cut off</span> <span>unexpectedly</span><br> <span>The server</span> <span>may have</span> <span>terminated abnormally</span> <span>before or during</span><br>
<span>processing the request</span><span>.</span><br> <span>The</span> <span>server connection</span> <span>was lost.</span> <span>Attempting</span> <span>reset</span><span>:</span> <span>success / or sometimes not</span><span>.</span></span><br>
<span lang="en"><span><br><br><br>I don't understand why all thes errors becose shortest_path function run correctly. Exple <br><br>SELECT * FROM shortest_path('SELECT gid as id,source::integer,target::integer,length::double precision as cost FROM ways',300,400, false, false); give to me :<br>
<br> vertex_id | edge_id | cost <br>-----------+---------+--------------------<br> 300 | 339 | 0.139255214687805<br> 299 | 338 | 0.179544765048058<br> 195 | 337 | 0.203993410356029<br>
63 | 56 | 0.163071365291157<br> 64 | 57 | 0.0210195901922476<br> 13 | 592 | 0.154135925931186<br> 353 | 593 | 0.167432867084967<br> 255 | 594 | 0.0922310799956524<br>
111 | 595 | 0.410249680272814<br> 435 | 596 | 0.323252439058039<br> 400 | -1 | 0<br>(11 lignes)<br><br>My table "ways" is join.<br><br><br><br>Thanks !<br></span></span><font color="#888888">-- <br>
<font size="6"><b style="color:rgb(0, 51, 51);font-family:courier new,monospace"><img><br>
</b><span style="color:rgb(0, 51, 51);font-family:courier new,monospace"><br><br></span></font><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br><font size="6"><b style="color:rgb(0, 51, 51);font-family:courier new,monospace"><img><br></b><span style="color:rgb(0, 51, 51);font-family:courier new,monospace"><br>
<br></span></font><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><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></div>
<br></div></div>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">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><font color="#888888"><br><br clear="all"><br>-- <br><font size="6"><b style="color:rgb(0, 51, 51);font-family:courier new,monospace"><img><br></b><span style="color:rgb(0, 51, 51);font-family:courier new,monospace"><br>
<br></span></font><br>
</font><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>