It looks like Mapserver fails, because the routing query fails:<div><br></div><div><font face="'courier new', monospace">ERROR: column "source" does not exist</font></div><div><br>Do you have a column named "source"?</div>
<div><br></div><div>Daniel<br><br><br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 6:31 AM, 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">Hello everybody. I am doing a project on routing and GIS and intend to use mapserver + pgrouting for it. Having compiled mapserver and pgrouting on my machine, I've tried to run some queries on pgrouting. There seems to be a problem with my query which is giving errors. I'm posting the query, the error generated by mapserver and the error.log file for mapserver. Please help me with making it work.<br>
<br>The query:<br><br>DATA "the_geom from (select b.gid, b.the_geom FROM (SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost FROM edges_line', 50, 210, false, false)) as a, edges_line as b where a.edge_id=b.gid) AS foo using unique gid using srid=-1"<br>
<br><br>The error generated by mapserver:<br><br>msDrawMap(): Image handling error. Failed to draw layer named 'route'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: column "source" does not exist
LINE 1: SELECT gid AS id, source::int4, target::int4, length::double...
^
QUERY: SELECT gid AS id, source::int4, target::int4, length::double precision AS cost FROM edges_line
<br><br><br>The output of the error.log file:<br><br><br>[Tue Jun 12 09:56:02 <a href="tel:2012%5D.582969" value="+12012582969" target="_blank">2012].582969</a> msPostGISLayerWhichShapes query: select encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as geom,"gid" from (select b.gid, b.the_geom FROM (SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost FROM edges_line', 50, 210, false, false)) as a, edges_line as b where a.edge_id=b.gid) AS foo where the_geom && GeomFromText('POLYGON((-6015.80966101695 -4605.49,-6015.80966101695 4811.71,6544.54966101695 4811.71,6544.54966101695 -4605.49,-6015.80966101695 -4605.49))',-1)<br>
[Tue Jun 12 09:56:02 <a href="tel:2012%5D.596551" value="+12012596551" target="_blank">2012].596551</a> msPostGISLayerWhichShapes query status: PGRES_FATAL_ERROR (7)<br>[Tue Jun 12 09:56:02 <a href="tel:2012%5D.596634" value="+12012596634" target="_blank">2012].596634</a> Error (msPostGISLayerWhichShapes()<br>
) executing query: ERROR: column "source" does not exist<br>
LINE 1: SELECT gid AS id, source::int4, target::int4, length::double...<br> ^<br>QUERY: SELECT gid AS id, source::int4, target::int4, length::double precision AS cost FROM edges_line<br>[Tue Jun 12 09:56:02 <a href="tel:2012%5D.596688" value="+12012596688" target="_blank">2012].596688</a> msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: column "source" does not exist<br>
LINE 1: SELECT gid AS id, source::int4, target::int4, length::double...<br> ^<br>QUERY: SELECT gid AS id, source::int4, target::int4, length::double precision AS cost FROM edges_line<br><br>I'm not able to diagnose the problem here. Please help me with it. Thank you everybody.<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>