Search code examples
routespostgispgrouting

Calculating route with pgrouting


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.


Solution

  • 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.