<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Alex,<br>
<br>
<div>> error : 07-22 06:17:31.835: E/AndroidRuntime(8018):
Caused by: java.lang.IndexOutOfBoundsException: Invalid index
33, size is 9</div>
<br>
hmmh, this does not look right. Would you open an issue for it? To
solve this I'll need the OSM file you used and the coordinates for
the route to reproduce this. <br>
<br>
<br>
> note that I hade to specify EncodingManager manually
otherwise I had another error ... saying<br>
> No vehicles are defined (no encoding manager set) <br>
<br>
If you only load the graph (which is what you do under Android)
you normally don't need this. So probably something else is wrong
(but I'll have a look into it while I'm investigating the other
issue)<br>
<br>
Regards,<br>
Peter.<br>
<br>
<br>
</div>
<blockquote
cite="mid:CAN3Fzp58aCrw_rSCgeUieyO+dO5WuBprBRvBM2-hDuWxnZ1ifA@mail.gmail.com"
type="cite">
<div dir="ltr">Ok I got a little further by following wiki
instructions to the letter and generating the propper android
jar :)
<div><br>
</div>
<div style="">Now the following commands make me have the
graphhopper loaded successfully but when trying to query for a
route I get and error : </div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style="">load : </div>
<div style=""><br>
</div>
<div style="">
<div> GraphHopper tmpHopp = new GraphHopper()</div>
<div><span class="" style="white-space:pre"> </span>
.forMobile()</div>
<div><span class="" style="white-space:pre"> </span>
.encodingManager(new EncodingManager("CAR"))</div>
<div><span class="" style="white-space:pre"> </span>
.chShortcuts(true, true);</div>
<div><span class="" style="white-space:pre"> </span>
tmpHopp.load(app.getOpenedBookRoutingFolder());</div>
<div style=""><br>
</div>
<div style="">//note that I hade to specify EncodingManager
manually otherwise I had another error ... saying //No
vehicles are defined (no encoding manager set) </div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style="">query : </div>
<div style=""><br>
</div>
<div style="">
<div> GHRequest req = new GHRequest(fromLat, fromLon, toLat,
toLon)</div>
<div><span class="" style="white-space:pre"> </span>
.algorithm("dijkstrabi").putHint("douglas.minprecision",
1);</div>
<div><span class="" style="white-space:pre"> </span>
GHResponse resp = hopper.route(req);</div>
<div><span class="" style="white-space:pre"> </span>
return resp;</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div style="">error : </div>
<div style=""><br>
</div>
<div style="">
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): Caused
by: java.lang.IndexOutOfBoundsException: Invalid index
33, size is 9</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
java.util.ArrayList.get(ArrayList.java:304)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.storage.MMapDataAccess.getInt(MMapDataAccess.java:271)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.storage.GraphStorage.getOtherNode(GraphStorage.java:405)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.storage.GraphStorage.access$600(GraphStorage.java:49)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.storage.GraphStorage$EdgeIterable.next(GraphStorage.java:577)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.util.XFirstSearch.start(XFirstSearch.java:65)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.storage.index.Location2NodesNtree$1.execute(Location2NodesNtree.java:545)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
gnu.trove.impl.hash.TIntHash.forEach(TIntHash.java:178)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.storage.index.Location2NodesNtree.findClosest(Location2NodesNtree.java:543)</div>
<div>07-22 06:17:31.835: E/AndroidRuntime(8018): <span
class="" style="white-space:pre"> </span>at
com.graphhopper.GraphHopper.route(GraphHopper.java:456)</div>
</div>
</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style=""><br>
</div>
<div style="">What am I doing wrong ? </div>
<div style=""><br>
</div>
<div style="">Thanks a lot for your help :) </div>
<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>