I am working on an Android app for navigation with PostGIS and pgrouting. I have implemented pgr_dijkstra and it's working fine. I am not considering direction in routing at this point and just want routes from my source to destination.
I am facing a problem when I am implementing k-shortest path (pgr_ksp) for finding alternative paths from source to destination. I guess pgr_ksp always consider direction when calculating the route. So when I give it a particular source and target value in the query, its gives me nothing and the reason behind this is at some point on the route between that source and target, some road segments share starting or ending point, that is why it can't generate route.
Kindly tell me if there is any possibility that direction not considered here just like Dijkstra
In this picture A is my source, B is my destination. Ignoring the direction of travel, ksp should give me shortest path i.e. node 1, 2, 5, 6
But it is giving me 1, 2, 3, 4, 5, 6 which is not shortest path. startpoint and endpoint is also mentioned here with their road segment color
Kindly suggest me a solution.