Dear friends. I'm new to pgrouting. It is part of my M.Tech thesis. I need to route from one point to another using dijkstra's algorithm. I intend to use pgrouting for it. I tried to follow the documentation of pgrouting along with some forum posts on websites. But despite having tried many combinations of code, I've been getting errors and I haven't been able to get the code to run. It is supposed to be simple but I'm obviously making a silly mistake somewhere. Please look into the code that I'm attaching and send me some suggestions as to how to make it work. Thank you very much. Here's the relevant layer code:<br>

<br>        LAYER<br>            NAME "route"<br>            CONNECTIONTYPE postgis<br>            CONNECTION "user=postgres password=********** dbname=VSDelhidb host=localhost"<br>            DEBUG 5<br>

            STATUS DEFAULT<br>            TYPE LINE<br>            DATA "the_geom from (SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost, length::double AS reverse_cost FROM edges_line', 50, 210, false, false)) AS foo using unique gid using srid=-1"<br>

            TEMPLATE "t"<br>                    <br>             #<br>            # //////////////////////////////////////////////////////THE CLASS THAT CLASSIFIES EVERYTHING IN IT. ////////////////////////////////<br>

             #<br><br>            CLASS<br>           <br>                NAME "0"<br>                STYLE<br>                    SYMBOL "circle"<br>                    SIZE 10<br>                    OUTLINECOLOR 255 0 0<br>

                    COLOR 165 42 42<br>           <br>            END #_________END OF THE CLASS THAT CLASSIFIES EVERYTHING.___________##############################################################<br>        END #________END OF THE LAYER THAT DRAWS EVERYTHING._________##############################################################################<br>

<br><br>I am getting this error:<br><br>msDrawMap(): Image handling error. Failed to draw layer named 'route'.
msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  column "the_geom" does not exist
LINE 1: select encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'he...
                                              ^
 
<br><br><br>When I brought up the error log, this is what I got:<br><br><br>[Mon Jun 11 17:33:41 2012].605652 msPostGISLayerNextShape called.<br>[Mon Jun 11 17:33:41 2012].605688 msPostGISLayerFreeItemInfo called.<br>[Mon Jun 11 17:33:41 2012].605716 msPostGISLayerClose called: the_geom from edges_arc<br>

[Mon Jun 11 17:33:41 2012].605764 msConnPoolRelease(Road4,user=postgres password=********** dbname=VSDelhidb host=localhost,0x88fe3f0)<br>[Mon Jun 11 17:33:41 2012].605801 msConnPoolClose(user=postgres password=********** dbname=VSDelhidb host=localhost,0x88fe3f0)<br>

[Mon Jun 11 17:33:41 2012].606352 msDrawMap(): Layer 3 (Road4), 0.487s<br>[Mon Jun 11 17:33:41 2012].606465 msPostGISLayerOpen called: the_geom from (SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost, length::double AS reverse_cost FROM edges_line', 50, 210, false, false)) AS foo using unique gid using srid=-1<br>

[Mon Jun 11 17:33:41 2012].606515 msPostGISLayerOpen: No connection in pool, creating a fresh one.<br>[Mon Jun 11 17:33:41 2012].796074 msConnPoolRegister(route,user=postgres password=********** dbname=VSDelhidb host=localhost,0x88fe3f0)<br>

[Mon Jun 11 17:33:41 2012].834424 msPostGISLayerOpen: Got PostGIS version 10500.<br>[Mon Jun 11 17:33:41 2012].834495 msPostGISLayerFreeItemInfo called.<br>[Mon Jun 11 17:33:41 2012].834635 msPostGISLayerWhichShapes called.<br>

[Mon Jun 11 17:33:41 2012].834677 msPostGISParseData called.<br>[Mon Jun 11 17:33:41 2012].834770 msPostGISParseData: unique_column=gid, srid=-1, geom_column_name=the_geom, table_name=(SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost, length::double AS reverse_cost FROM edges_line', 50, 210, false, false)) AS foo<br>

[Mon Jun 11 17:33:41 2012].834817 msPostGISBuildSQL called.<br>[Mon Jun 11 17:33:41 2012].834855 msPostGISBuildSQLItems called.<br>[Mon Jun 11 17:33:41 2012].834887 msPostGISBuildSQLItems: 0 items requested.<br>[Mon Jun 11 17:33:41 2012].834919 msPostGISBuildSQLFrom called.<br>

[Mon Jun 11 17:33:41 2012].834949 msPostGISBuildSQLWhere called.<br>[Mon Jun 11 17:33:41 2012].834978 msPostGISBuildSQLSRID called.<br>[Mon Jun 11 17:33:41 2012].835008 msPostGISBuildSQLSRID: SRID provided (-1)<br>[Mon Jun 11 17:33:41 2012].835037 msPostGISBuildSQLBox called.<br>

[Mon Jun 11 17:33:41 2012].835136 msPostGISLayerWhichShapes query: select encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as geom,"gid" from (SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost, length::double AS reverse_cost FROM edges_line', 50, 210, false, false)) 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>

[Mon Jun 11 17:33:41 2012].837949 msPostGISLayerWhichShapes query status: PGRES_FATAL_ERROR (7)<br>[Mon Jun 11 17:33:41 2012].838047 Error (msPostGISLayerWhichShapes()<br>) executing query: ERROR:  column "the_geom" does not exist<br>

LINE 1: select encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'he...<br>                                              ^<br>[Mon Jun 11 17:33:41 2012].838102 msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR:  column "the_geom" does not exist<br>

LINE 1: select encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'he...<br>                                              ^<br> <br>[Mon Jun 11 17:33:41 2012].838139 msPostGISLayerFreeItemInfo called.<br>

[Mon Jun 11 17:33:41 2012].838171 msPostGISLayerClose called: the_geom from (SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost, length::double AS reverse_cost FROM edges_line', 50, 210, false, false)) AS foo using unique gid using srid=-1<br>

[Mon Jun 11 17:33:41 2012].838205 msConnPoolRelease(route,user=postgres password=********** dbname=VSDelhidb host=localhost,0x88fe3f0)<br>[Mon Jun 11 17:33:41 2012].838239 msConnPoolClose(user=postgres password=********** dbname=VSDelhidb host=localhost,0x88fe3f0)<br>

[Mon Jun 11 17:33:41 2012].838779 msDrawMap(): Image handling error. Failed to draw layer named 'route'.<br>[Mon Jun 11 17:33:41 2012].840194 msPostGISLayerClose called: the_geom from edges_line<br>[Mon Jun 11 17:33:41 2012].840272 msPostGISLayerClose called: the_geom from allfeatureslabel_point<br>

[Mon Jun 11 17:33:41 2012].840309 msPostGISLayerClose called: the_geom from namesofroads_text<br>[Mon Jun 11 17:33:41 2012].840347 msPostGISLayerClose called: the_geom from edges_arc<br>[Mon Jun 11 17:33:41 2012].840386 msPostGISLayerClose called: the_geom from (SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, length::double precision AS cost, length::double AS reverse_cost FROM edges_line', 50, 210, false, false)) AS foo using unique gid using srid=-1<br>

[Mon Jun 11 17:33:41 2012].842833 freeLayer(): freeing layer at 0x88724e8.<br>[Mon Jun 11 17:33:41 2012].842908 msPostGISLayerIsOpen called.<br>[Mon Jun 11 17:33:41 2012].842953 freeLayer(): freeing layer at 0x88732e8.<br>

[Mon Jun 11 17:33:41 2012].842984 msPostGISLayerIsOpen called.<br>[Mon Jun 11 17:33:41 2012].843025 freeLayer(): freeing layer at 0x8874220.<br>[Mon Jun 11 17:33:41 2012].843057 msPostGISLayerIsOpen called.<br>[Mon Jun 11 17:33:41 2012].843099 freeLayer(): freeing layer at 0x88750d8.<br>

[Mon Jun 11 17:33:41 2012].843152 msPostGISLayerIsOpen called.<br>[Mon Jun 11 17:33:41 2012].843203 freeLayer(): freeing layer at 0x8875fb8.<br>[Mon Jun 11 17:33:41 2012].843351 msPostGISLayerIsOpen called.<br><br><br>Please help! Thank you!<br>