Currently i have created the layer in Geoserver by configuring a native SQL statement, there i am getting the route geometry details from DB by following query
SELECT ST_MakeLine(route.geom) FROM ( SELECT geom FROM pgr_fromAtoB('ways', %x1%, %y1%, %x2%, %y2% ) ORDER BY seq) AS route this will give me linestring but along with this i want some other details i.e name of the node etc for that i just modified the query as
SELECT ST_MakeLine(route.geom),text(route.name) FROM ( SELECT geom,name FROM pgr_fromAtoB('ways', %x1%, %y1%, %x2%, %y2% ) ORDER BY seq) AS route name above is nothing but the name of the route and text() will returns me the name if each route.But this gives syntax error.How to overcome this issue?
أكثر...
SELECT ST_MakeLine(route.geom) FROM ( SELECT geom FROM pgr_fromAtoB('ways', %x1%, %y1%, %x2%, %y2% ) ORDER BY seq) AS route this will give me linestring but along with this i want some other details i.e name of the node etc for that i just modified the query as
SELECT ST_MakeLine(route.geom),text(route.name) FROM ( SELECT geom,name FROM pgr_fromAtoB('ways', %x1%, %y1%, %x2%, %y2% ) ORDER BY seq) AS route name above is nothing but the name of the route and text() will returns me the name if each route.But this gives syntax error.How to overcome this issue?
أكثر...