[postgis-users] pgrouting

searchelite searchelite at gmail.com
Thu Dec 11 01:50:14 PST 2008




Daniel Kastl-2 wrote:
> 
> As David said: once you selected the nearest vertex to your start, take
> this vertex ID as your start point (source), and take the nearest vertex
> ID to your end point as the endpoint (target).
> 
> Then use Dijkstra for example:
> 
> SELECT * FROM shortest_path('
> 		SELECT gid as id, 
> 			 source::integer, 
> 			 target::integer, 
> 			 length::double precision as cost 
> 			FROM ways', 
> 		10, 20, false, false); 
> 
> In this case start point is 10 and end point is 20.
> See http://pgrouting.postlbs.org/wiki/WorkshopFOSS4G2008/ch07
> 
> Daniel
> 
> 

Thanks for the reply...

It seems that from your explanation the source and target are the road
vertex not the actual vehicle point and emergency point(correct me if i'm
wrong). What i want is to get the path with vehicle_point as the source and
emergency_point as the target

thank you
-- 
View this message in context: http://www.nabble.com/pgrouting-tp18751801p20952443.html
Sent from the PostGIS - User mailing list archive at Nabble.com.




More information about the postgis-users mailing list