Hi,
i’m having some issues perform routing with a custom and simple graph defined with JOSM.
Here’s the code for routing part:
GraphHopper hopper = new GraphHopperOSM()
.setOSMFile(f.getAbsolutePath())
.setGraphHopperLocation(ghDir.getAbsolutePath())
.setCHEnabled(true)
.setEnableInstructions(false)
.setEncodingManager(new EncodingManager("bike"))
.forServer();
hopper.importOrLoad();
double[] pointA = new double[]{27.39085347684,-19.41636378195};
double[] pointF = new double[]{-0.34328022112,15.87322430068};
GHRequest req = new GHRequest(pointA[0], pointA[1], pointF[0],
pointF[1]).setAlgorithm(Parameters.Algorithms.DIJKSTRA_BI);
req.getHints().put(Parameters.Routing.INSTRUCTIONS, "true");
GHResponse resp = hopper.route(req);
PathWrapper wrapper = resp.getBest();
and i receive the exception
Point 0 is ouf of bounds: 27.39085347684,-19.41636378195
Heres’ the BBox values:
minLon = -19.41636359877207
maxLon = 15.87322430068
minLat = -0.34328022112
maxLat = 36.13078721876
what is wrong ?
the .osm file can be located here: https://www.dropbox.com/s/x78f655rf0c2yfp/square.osm?dl=0