Hi All,

i'm writing a routing application where i want to calculte the
kilemeters for the shortest path from one point to another.

I managed this using the DijkstraShortestPathFinder with an associated
EdgeWeighter.

private final EdgeWeighter weighter = new EdgeWeighter() {
  public double getWeight(Edge e) {
    LineString line = (LineString) e.getObject();
      if (line == null)
        return 1;

    return (line.getLength());
  }
};

Now i want to calculate the cost in "meter" or in "kilometer". To get
cost (in a unknown measurement) i invoke the "getCost()" Method from the
DijkstraShortestPathFinder class

My question is what a measurement do i get using the getCost()? I think
i'm getting the measurement of the getLength on a LineString (because of
my edgeWeighter implementation) ... but how do i convert this
measurements to "meter" or in "kilometer"?

thanks
Claudio Romano


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to