Dear All,
I am using the Graph api to construct a graph based on lineStrings - 
that works perfectly. I would like to do a shortest path computation 
based on geographical distance, and need to implement a Weighter.

the docs show this snippet:

DijkstraIterator.EdgeWeigter weighter =new  DijkstraIterator.EdgeWeighter() {
    public  double  getWeight(Edge e) {
       return  1.0;//constant
    }
}

which results in a constant weight for an edge of 1.

How do I get the actual length of an edge, in the original feature's units...

I need the values also for other purposes, so really neend to access the edge 
length property.
Is it possible?
Thanks
Martin



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to