Hello,

I have created working example that returns shortest path from point A to B
for a given graph - I am using BasicDirectedLineGraphGenerator and adding
LineSegment objects to the graph.
I am interested how can i teach Dijkstra algorithm about data like speed
limits etc. which 
will make influence on weight of particular segment.
Point is that when i make LineSegments from my features and add them to the
graph generator 
i don't have anymore information about speed limit etc. In
DijkstraIterator.EdgeWeighter.getWeight() method i can cast Edge object back
to LineSegment object. But it is not good because 
i need to return weight based on different parameters (not only
LineSegment.getLength()) and i 
can't store those parameters in LineSegment object.
I tried to make new class that will contain LineSegment object and set of
parameters 
but i am unable to add it to the graph.

I've searched this forum and couldn't find good explanation of this.

Any help and and/or pointing direction about the subject would be most
welcome.


Best regards.
-- 
View this message in context: 
http://n2.nabble.com/DijkstraShortestPathFinder_getWeight-tp3446503p3446503.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to