Hello,
I am working on implementing the Dijkstra algorithm in my project (using
the predefined Dijkstra class) and i got stuck with an issue that, for the
life of me, i can not find a solution for.
So i am creating the graph based on my shapefile and the originPoint. The
code looks something like this http://screencast.com/t/dKQOETw2MRM
My problem lays with this instance of class in particular:
EdgeWeighter weighter = new EdgeWeighter() {
public double getWeight(org.geotools.graph.structure.Edge e) {
System.out.println("e is : "+e.getNodeA().getObject()+"
"+ e.getNodeB().getObject());
SimpleFeature aLineString = (SimpleFeature) e.getObject();
//System.out.println(aLineString);
Geometry geom = (Geometry)
aLineString.getDefaultGeometry();
// System.out.println(geom);
return geom.getLength(); }
};
I am overriding the function getWeight defined in DijkstraIterator
predefined class but apparently looks like the code does not retrieve all
the needed edges of my graph and i would very much like to see the
structure of org.geotools.graph.structure.Edge class to understand why does
it stop at that point and to see where the problem is .
Could you please point me to somewhere where i can find the solution for
this issue?
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users