[pgrouting-users] pgrouting with mapserver

Daniel Kastl daniel at georepublic.de
Tue Jun 12 02:03:10 PDT 2012


It looks like Mapserver fails, because the routing query fails:

ERROR: column "source" does not exist

Do you have a column named "source"?

Daniel



On Tue, Jun 12, 2012 at 6:31 AM, Annu Anurag <i.skidoosh at gmail.com> wrote:

> 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.
>
> The query:
>
> 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"
>
>
> The error generated by mapserver:
>
> 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
>
>
> The output of the error.log file:
>
>
> [Tue Jun 12 09:56:02 2012].582969 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)
> [Tue Jun 12 09:56:02 2012].596551 msPostGISLayerWhichShapes query status:
> PGRES_FATAL_ERROR (7)
> [Tue Jun 12 09:56:02 2012].596634 Error (msPostGISLayerWhichShapes()
> ) 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
> [Tue Jun 12 09:56:02 2012].596688 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
>
> I'm not able to diagnose the problem here. Please help me with it. Thank
> you everybody.
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>


-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20120612/e68838ce/attachment.html>


More information about the Pgrouting-users mailing list