I am trying to run a ST_MakeLine query that will return the shortest distance between given coordinates The code is as follows:
SELECT ST_MakeLine(route.geom) as test
FROM (SELECT *
FROM pgr_fromAtoB('roads2_noded',73.1789,33.5183,73.1768,33.5191)
ORDER BY seq
) As route
The result looks like this:
it's clear that the result does not show null. But when I view it in the Geometry Viewer, it gives the following message:
Can someone tell me what this message means and how can I find a workaround to this problem? The geometry type of my roads shapefile is MULTILINESTRING.
St_AsText (route.geom) shows the following result:
SELECT ST_AsText( ST_MakeLine(route.geom)) FROM (SELECT *FROM pgr_fromAtoB('roads2_noded',73.1789,33.5183,73.1768,33.5191)
ORDER BY seq
) As route
Using simple Select from pgr_fromAtoB gives:
SELECT * FROM pgr_fromAtoB('roads2_noded',73.1789,33.5183,73.1768,33.5191) ORDER BY seq
The roads2_noded is the roads shapefile I am working on shown below:
ST_AsText(route.geom)
?SELECT * FROM pgr_fromAtoB('roads2_noded',33.5183,73.1789,33.5191,73.1768) ORDER BY seq
? What does it provide?