I am using GraphHopper
for finding a route between points. I want to predict the location of the vehicle at the given time t if it is moving at an average speed of x. GraphHopper
has a module for finding isochrone but I can't figure out how I can run it on a single route. Below is the code which I am currently using
List<GHPoint> points = new ArrayList<>();
points.add(origin);
for (GHPoint pnt : waypoints) {
points.add(pnt);
}
points.add(destination);
GHRequest req = new GHRequest(points).
setWeighting("shortest").
setVehicle("car").
setLocale(Locale.US);
GHResponse rsp = graphHopper.route(req);
// first check for errors
if(rsp.hasErrors()) {
// handle them!
// rsp.getErrors()
List<Throwable> errors = rsp.getErrors();
return null;
}
PathWrapper bestPath = rsp.getBest();