[pgrouting-users] Fastest path instead of shortest path
Salet Frank
frank.salet at localyse.nl
Wed Aug 4 09:07:50 EDT 2010
Hey guys,
Instead of calculating routes based on shortest path I want to calculate routes based on fastest path. I already have a column with drivetime information (ie in table 'ways' there is a column called 'time' with minutes). Can this be done with the hereunder code and, if yes, what do I need to change? Thank you!
case 'SPD' : // Shortest Path Dijkstra
$sql = "SELECT rt.gid, AsText(rt.the_geom) AS wkt,
length(rt.the_geom) AS length, ".TABLE.".id
FROM ".TABLE.",
(SELECT gid, the_geom
FROM dijkstra_sp_delta(
'".TABLE."',
".$startEdge['source'].",
".$endEdge['target'].",
3000)
) as rt
WHERE ".TABLE.".gid=rt.gid;";
break;
Regards,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20100804/61ce223a/attachment.html
More information about the Pgrouting-users
mailing list