How can i, if it's even posible, calculate a route between two points using only existing points as a source? No network/roads provided, i have only points. I've tried this http://docs.pgrouting.org/dev/src/tsp/doc/index.html, but i think i'm getting wrong way.
Asked
Active
Viewed 990 times
0
-
TSP is for the shortest route that visits all points. What kind of route are you trying to calculate? – John Powell Jul 23 '14 at 14:34
1 Answers
1
You can't with pgRouting. You can only calculate the straight line distance between the points. To compute a route that would follow a road network you have to have the road network. You might try to use something like Google Maps API or Project-OSRM API. Both of these are web services that have the road network on a remote server and you can pass them the points and they will calcuate the route.

Stephen Woodbridge
- 1,100
- 1
- 8
- 16
-
My problem is that i need to draw routes inside a building. Do you know any solution or where should i look for? Thanks in advance. – Arman Khubezhov Jul 27 '14 at 07:19
-
Then you will have to construct the edges for the hallways, stairs, elevators, etc. then you can do it using those. Think about the problem like. I ask you how to get from the living room to the laundry room in my house. Without a plan you can't do it. Well the computer needs a plan also. you supply the plan as a list of all possible edges that are in the building and then pgRouting can figure out the best way to make the route from those edges. – Stephen Woodbridge Jul 28 '14 at 14:21
-
Thanks for your help. I think i'll try to mess around with IndoorOSM http://wiki.openstreetmap.org/wiki/IndoorOSM then process data with pgRouting. – Arman Khubezhov Jul 29 '14 at 17:14
-
@ArmanKhubezhov if you have Java knowledge it should be easily possible to import any kind of data into GraphHopper, not just OSM. – Karussell Sep 12 '14 at 12:16