Hi,
I need to get a set of points of a path obtained by Dijkstra’s algorithm, but I get the following error on the second iteration of the outer loop:
java.lang.RuntimeException: java.lang.IllegalStateException: Edge 2149 was empty when requested with node 59, array index:0, edges:221
This code:
for (int nodeFrom : nodeIdsFrom) {
for (int nodeTo : nodeIdsTo) {
Path path = dijkstra.calcPath(nodeFrom, nodeTo);
if (path.isFound()) {
PointList points = path.calcPoints();
// do something
}
}
}
I get the nodes using the method:
NodeVisitor nearestNodes = new NodeVisitor();
index.query(new BBox(p.getX() - 0.02, p.getX() + 0.02, p.getY() - 0.02, p.getY() + 0.02), nearestNodes);
I really don’t understand what is causing this error