Hi everyone … I try using latest GH 6.2, and want to request using shortest weight
GraphHopper hopper = new GraphHopper();
hopper.setOSMFile(osmFile);
hopper.setGraphHopperLocation(graphHopperLocation);
// see docs/core/profiles.md to learn more about profiles
hopper.setProfiles(new Profile("car").setVehicle("car").setWeighting("shortest").setTurnCosts(false));
// this enables speed mode for the profile we called car
hopper.getCHPreparationHandler().setCHProfiles(new CHProfile("car"));
if (closeAfterLoad)
hopper.importAndClose();
else
hopper.importOrLoad();
And this is my GHRequest
GHRequest req = new GHRequest(originLatitude, originLongitude, destinationLatitude, destinationLongitude)
.setAlgorithm(Parameters.Algorithms.DIJKSTRA_BI)
.setProfile(vehicleProfile)
.setLocale(Locale.ENGLISH);
req.getHints().putObject("elevation", false);
req.getHints().putObject(Parameters.Routing.INSTRUCTIONS, false);
req.getHints().putObject(Parameters.Routing.CALC_POINTS, generateRoutePath);
I got this errors.
Speed cannot be 0 for unblocked edge, use access properties to mark edge blocked! Should only occur for shortest path calculation. See #242.
But after I change the weight to “fastest”, it’s running well. I taught that “shortest” weighting doesn’t need vehicle speed, but why I got this error ? There’s no documentation about that