I have installed PostGIS/PostgreSQL, imported the OSM data from OpenStreetMaps and I am querying the database to get shortest path between two points. As is visible on image the query returns the nodes in the way between the points, however, the query returns just nodes and I need to draw the way on Map (Google map). Does anybody know how can I draw the way based on these nodes (latitude, longitude)?
SELECT * FROM shortest_path('
SELECT id AS id,
source::int4 AS source,
target::int4 AS target,
cost::float8 AS cost
FROM br_2po_4pgr',
1,
5110,
false,
false)
It returns all coordinates between the source and target, but each line has two pairs of latitude and longitude (x1,y1 and x2,y2).. I don't know which one I have to use..
thanks!