[OSM-dev] Custom costs with pgRouting and osm2pgrouting

Josh Doe josh at joshdoe.com
Wed Aug 31 07:04:27 BST 2011


I've used osm2pgrouting to import a small area, and have been running
pgRouting's driving_distance() function simply using length as the
cost, but now I'd like to compute custom costs that take into account
things like maxspeed, surface, etc. The simplest example is doing
least-time rather than least-distance by using length/maxspeed. I
haven't been able to find any examples that show how to do this, and
would greatly appreciate working code or pointers to docs I may have
missed.
Thanks,
-Josh



More information about the dev mailing list