I'm looking to set up a routing system that will give distances based on network routes, rather than straight lines (ie. ST_Distance).
To do this, I'd like to set up a pgRouting database where the cost associated with the OSM 'classes' are similar to the OSRM project - which gives more realistic directions than the pgRouting example I've set up so far.
What I'm looking for is the class cost breakdown similar to what is in the pgRouting documentation:
UPDATE classes SET cost=1 ;
UPDATE classes SET cost=2.0 WHERE name IN ('pedestrian','steps','footway');
UPDATE classes SET cost=1.5 WHERE name IN ('cicleway','living_street','path');
UPDATE classes SET cost=0.8 WHERE name IN ('secondary','tertiary');
UPDATE classes SET cost=0.6 WHERE name IN ('primary','primary_link');
UPDATE classes SET cost=0.4 WHERE name IN ('trunk','trunk_link');
UPDATE classes SET cost=0.3 WHERE name IN ('motorway','motorway_junction','motorway_link');
Does OSRM use a similar cost scheme? And is it available in their documentation somewhere?
A basic example of the difference is directions from Boulder, CO to my house in Denver, CO: the two systems takes 2 different routes - the OSRM route follows major roads more closely until it needs to take minor roads, while the pgRouting method will take more minor roads, leaving major roads as soon as possible.